[FFmpeg-devel] [PATCH]Fix brokem mp3 in avi

Michael Niedermayer michaelni at gmx.at
Wed Oct 10 19:39:25 CEST 2012


On Wed, Oct 10, 2012 at 06:36:33PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes the remaining sample from ticket #606 for me.
> 
> Please review, Carl Eugen

>  avidec.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> cc07ff3dc0f5fcba5aa6ecb452fdd57d6b75ab43  patchmp3avi.diff
> diff --git a/libavformat/avidec.c b/libavformat/avidec.c
> index 8f548eb..e383245 100644
> --- a/libavformat/avidec.c
> +++ b/libavformat/avidec.c
> @@ -681,7 +681,8 @@ static int avi_read_header(AVFormatContext *s)
>                          av_log(s, AV_LOG_DEBUG, "overriding invalid dshow_block_align of %d\n", ast->dshow_block_align);
>                          ast->dshow_block_align = 0;
>                      }
> -                    if(st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align == 1024 && ast->sample_size == 1024) {
> +                    if(st->codec->codec_id == AV_CODEC_ID_AAC && ast->dshow_block_align == 1024 && ast->sample_size == 1024 ||
> +                       st->codec->codec_id == AV_CODEC_ID_MP3 && ast->dshow_block_align == 1152 && ast->sample_size == 1152) {
>                          av_log(s, AV_LOG_DEBUG, "overriding sample_size\n");
>                          ast->sample_size = 0;
>                      }

LGTM

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121010/c36db848/attachment.asc>


More information about the ffmpeg-devel mailing list