[FFmpeg-cvslog] avconv: fix behavior with -ss as an output option.

Anton Khirnov git at videolan.org
Sat May 19 01:00:09 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu May 17 12:42:03 2012 +0200| [01e98b1b006c67ab0948f3c1de65a94609fe79cf] | committer: Anton Khirnov

avconv: fix behavior with -ss as an output option.

Don't return from poll_filters() immediately, there may be other frames
and/or other streams to handle.

Fixes a memleak.

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

 avconv.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/avconv.c b/avconv.c
index 85ee6f7..07bb86d 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1704,8 +1704,10 @@ static int poll_filters(void)
                                                    AV_TIME_BASE_Q,
                                                    ost->st->codec->time_base);
 
-            if (of->start_time && filtered_frame->pts < of->start_time)
-                return 0;
+            if (of->start_time && filtered_frame->pts < of->start_time) {
+                avfilter_unref_buffer(picref);
+                continue;
+            }
 
             switch (ost->filter->filter->inputs[0]->type) {
             case AVMEDIA_TYPE_VIDEO:



More information about the ffmpeg-cvslog mailing list