[FFmpeg-cvslog] ffmpeg: only apply last picture flush code at EOF

Michael Niedermayer git at videolan.org
Sun May 17 00:57:41 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat May 16 23:08:09 2015 +0200| [b87dd7f82d4df6c6207cab8e40e28e5b3fe81d0f] | committer: Michael Niedermayer

ffmpeg: only apply last picture flush code at EOF

Fixes Ticket4562

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b87dd7f82d4df6c6207cab8e40e28e5b3fe81d0f
---

 ffmpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index be8b078..6fe169a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1270,7 +1270,7 @@ static int reap_filters(int flush)
                 if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) {
                     av_log(NULL, AV_LOG_WARNING,
                            "Error in av_buffersink_get_frame_flags(): %s\n", av_err2str(ret));
-                } else if (flush) {
+                } else if (flush && ret == AVERROR_EOF) {
                     if (filter->inputs[0]->type == AVMEDIA_TYPE_VIDEO)
                         do_video_out(of->ctx, ost, NULL, AV_NOPTS_VALUE);
                 }



More information about the ffmpeg-cvslog mailing list