[FFmpeg-devel] [PATCH] Fixed missing error handling in yadif poll_frame

Nicolas George nicolas.george at normalesup.org
Sun Apr 15 15:57:29 CEST 2012

Le septidi 27 germinal, an CCXX, Robert Nagy a écrit :
> How about this then?
> +    if (val <= 0)
> +        return val;
>      if (val >= 1 && !yadif->next) { //FIXME change API to not requre this red tape

Unless I am mistaken, the "val <= 0" and "val >= 1" tests are redundant.

>          if ((ret = avfilter_request_frame(link->src->inputs[0])) < 0)
>              return ret;
>          val = avfilter_poll_frame(link->src->inputs[0]);
> +        if(val <= 0)
> +            return val;

It can no longer recurse, thanks.

OTOH, I am not sure whether this is correct: can yadif return exactly as
many frames as val? Or does it need val frames to produce val/1? Or

Does this fix an actual, current problem? The semantic of poll_frame is a
mess, and I have a project to eliminate it (but I am currently waiting for
the "complex filtergraphs" patch to land on the libav side, to avoid


  Nicolas George
-------------- 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/20120415/b14f6a4b/attachment.asc>

More information about the ffmpeg-devel mailing list