diff options
author | Alexis Ballier <aballier@gentoo.org> | 2015-10-16 10:42:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-18 11:55:40 +0200 |
commit | 6e8d856ad6d3decfabad83bc169c2e7a16a16b55 (patch) | |
tree | 9ca6d329979e1f8f039d51daa3bcf0307d60c69d /libavcodec/wmv2dsp.c | |
parent | fd46d6deac9b29b07c5d255d0c004782c85fdd7d (diff) | |
download | ffmpeg-6e8d856ad6d3decfabad83bc169c2e7a16a16b55.tar.gz |
libavcodec/mpegvideo_enc.c: Fix encoding videos with less frames than the delay of the encoder.
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.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/wmv2dsp.c')
0 files changed, 0 insertions, 0 deletions