[FFmpeg-devel] [PATCH 2/2] libavcodec/mpegvideo_enc.c: Fix encoding videos with less frames than the delay of the encoder.

Michael Niedermayer michael at niedermayer.cc
Sun Oct 18 12:09:48 CEST 2015


On Fri, Oct 16, 2015 at 10:42:33AM +0200, Alexis Ballier wrote:
> When the encoder is fed with less frames than its delay, the picture list looks like { NULL, NULL, ..., frame, frame, frame }. When flushing the encoder (input frame == NULL), we need to ensure the picture list is shifted enough so that we do not return an empty packet, which would mean the encoder has finished, while it has not encoded any frame.
> 
> Before the patch, the command:
> './ffmpeg_g -loglevel debug -f lavfi -i "testsrc=d=0.01" -bf 2 -vcodec mpeg2video out.mxf' prints:
> 
> Output stream #0:0 (video): 1 frames encoded; 0 packets muxed (0 bytes);
> 
> After:
> 
> Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (8058 bytes);
> 
> Relates to ticket #4817.
> ---
>  libavcodec/mpegvideo_enc.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151018/c42a5e7b/attachment.sig>


More information about the ffmpeg-devel mailing list