[FFmpeg-devel] [PATCH] ffmpeg.c : do not reset frame size after encoding small last frame

Justin Ruggles justin.ruggles
Thu Apr 16 05:11:35 CEST 2009


Hi,

This patch removes the save/restore of the previous enc->frame_size
before and after writing a small last frame.

This makes the value correct when writing the last packet.  The muxer
should not assume this value to be constant during encoding, so should
not use it if rewriting the header during write_trailer().  The FLAC
muxer did this, but I fixed it earlier today.

As a result, the recent addition by Baptiste to calculate the packet
duration for the small last frame is not needed since it will be
correctly calculated by lavf if enc->frame_size is correct.

-Justin


-------------- next part --------------
A non-text attachment was scrubbed...
Name: last_audio_frame_size.diff
Type: text/x-diff
Size: 1236 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090415/6a4f3048/attachment.diff>



More information about the ffmpeg-devel mailing list