[FFmpeg-devel] [PATCH] ffmpeg: poll filters even after -t limit.

Nicolas George nicolas.george at normalesup.org
Thu Jul 5 21:04:06 CEST 2012


If not, frames can still arrive to the sink and accumulate.
The frames past recording time will be ignored in do_*_out.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 ffmpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


That makes -t start working with -filter_complex;
maybe it is all it needs now, but I am not sure yet.


diff --git a/ffmpeg.c b/ffmpeg.c
index 1119fdf..5f4ada1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1948,7 +1948,7 @@ static int poll_filters(void)
                 avcodec_get_frame_defaults(ost->filtered_frame);
             filtered_frame = ost->filtered_frame;
 
-            while (!ost->is_past_recording_time) {
+            while (1) {
                 ret = av_buffersink_get_buffer_ref(ost->filter->filter, &picref,
                                                    AV_BUFFERSINK_FLAG_NO_REQUEST);
                 if (ret < 0) {
-- 
1.7.10



More information about the ffmpeg-devel mailing list