On Tue, May 26, 2015 at 11:26:25PM +0200, Carl Eugen Hoyos wrote: > Hi! > > Attached patch from 2002 fixes ticket #4565. > Michael added a comment in 359fa0fe that some demuxers > may not like it though. > > Please comment, Carl Eugen
[...]
> diff --git a/libavformat/riffenc.c b/libavformat/riffenc.c
> index d429df0..8373f0b 100644
> --- a/libavformat/riffenc.c
> +++ b/libavformat/riffenc.c
> @@ -103,7 +103,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext
> *enc, int flags)
> }
>
> if (enc->codec_id == AV_CODEC_ID_MP2) {
> - blkalign = frame_size;
> + blkalign = 144 * enc->bit_rate/enc->sample_rate;
this must be rounded up when its not exact
this might work: (144 * enc->bit_rate - 1)/enc->sample_rate + 1;
also fate tests need to be updated
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct answer.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list [email protected] http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
