[FFmpeg-cvslog] vf_thumbnail: forward request_frame at least once.

Nicolas George git at videolan.org
Sat Mar 17 17:27:36 CET 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Sun Mar 11 00:19:50 2012 +0100| [69174fad736e4ced0010a25e0fde5389ba9c77f0] | committer: Nicolas George

vf_thumbnail: forward request_frame at least once.

The current version relied on poll_frame to request
the very first frame, that would not work if the
surrounding code does not call poll_frame.

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

 libavfilter/vf_thumbnail.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c
index fe4a086..0b7ba06 100644
--- a/libavfilter/vf_thumbnail.c
+++ b/libavfilter/vf_thumbnail.c
@@ -176,11 +176,11 @@ static int request_frame(AVFilterLink *link)
 
     /* loop until a frame thumbnail is available (when a frame is queued,
      * thumb->n is reset to zero) */
-    while (thumb->n) {
+    do {
         int ret = avfilter_request_frame(link->src->inputs[0]);
         if (ret < 0)
             return ret;
-    }
+    } while (thumb->n);
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list