Browse code

ffmpeg: only apply last picture flush code at EOF

Fixes Ticket4562

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

Michael Niedermayer authored on 2015/05/17 06:08:09
Showing 1 changed files
... ...
@@ -1270,7 +1270,7 @@ static int reap_filters(int flush)
1270 1270
                 if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) {
1271 1271
                     av_log(NULL, AV_LOG_WARNING,
1272 1272
                            "Error in av_buffersink_get_frame_flags(): %s\n", av_err2str(ret));
1273
-                } else if (flush) {
1273
+                } else if (flush && ret == AVERROR_EOF) {
1274 1274
                     if (filter->inputs[0]->type == AVMEDIA_TYPE_VIDEO)
1275 1275
                         do_video_out(of->ctx, ost, NULL, AV_NOPTS_VALUE);
1276 1276
                 }