[FFmpeg-devel] [PATCH 3/6] vf_thumbnail: forward request_frame at least once.
Michael Niedermayer
michaelni at gmx.at
Sun Mar 11 08:07:33 CET 2012
On Sun, Mar 11, 2012 at 12:29:47AM +0100, Nicolas George wrote:
> 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.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> 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;
LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There seems to be only one solution to NIH syndrom, ... a shooting squad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120311/a650fe22/attachment.asc>
More information about the ffmpeg-devel
mailing list