[FFmpeg-devel] [PATCH] fix muxing pcm in MOV when using avcodec_encode_audio()

Michael Niedermayer michaelni at gmx.at
Thu Feb 9 18:19:12 CET 2012


On Thu, Feb 09, 2012 at 10:39:09AM -0500, Andrew Wason wrote:
> Muxing pcm audio in MOV using avcodec_encode_audio() is failing
> because avcodec_encode_audio() returns an incorrect packet size of 4
> bytes. This can be reproduced by modifying the sample
> ffmpeg/doc/examples/muxing.c to encode PCM, see attached patch
> muxing-test.diff
> 
> I git bisected and commit 89ddff92a385 is the one that broke this. In
> mov_write_header() if st->codec->frame_size <= 1 it sets it to 1. Then
> avcodec_encode_audio() sets frame->nb_samples = avctx->frame_size, and
> frame->nb_samples of 1 is used to compute a packet size of 4 bytes.
> 
> Attached patch mov-pcm-framesize.diff changes mov_write_header() to
> leave st->codec->frame_size as is instead of forcing it to 1.

patch seems to pass fate
baptiste ?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20120209/0cb0bc65/attachment.asc>


More information about the ffmpeg-devel mailing list