ffmpeg: check ost->finished in reap_filters()
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 14 Jan 2014 03:31:29 +0000 (04:31 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 17 Jan 2014 22:47:36 +0000 (23:47 +0100)
This avoids finished output streams continuing to receive frames

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

index 6c51ad0..9cc722f 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1093,6 +1093,10 @@ static int reap_filters(void)
                 }
                 break;
             }
+            if (ost->finished) {
+                av_frame_unref(filtered_frame);
+                continue;
+            }
             frame_pts = AV_NOPTS_VALUE;
             if (filtered_frame->pts != AV_NOPTS_VALUE) {
                 int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;