On Sun, May 13, 2012 at 09:31:06PM +0200, Robert Nagy wrote:
> --- a/libavfilter/vf_yadif.c
> +++ b/libavfilter/vf_yadif.c
> @@ -220,7 +220,9 @@ static void return_frame(AVFilterContext *ctx, int
> is_second)
> if (is_second) {
> int64_t prev_pts = yadif->prev->pts;
> int64_t cur_pts = yadif->cur->pts;
> - int64_t next_pts = yadif->next->pts;
> + int64_t next_pts = yadif->next->pts ?
> + yadif->next->pts :
> + yadif->cur->pts * 2 - yadif->prev->pts;
Indentation is off, fix like this:
int64_t next_pts = yadif->next->pts ?
yadif->next->pts :
yadif->cur->pts * 2 - yadif->prev->pts;
Also remove the trailing whitespace.
> @@ -303,8 +305,18 @@ static int request_frame(AVFilterLink *link)
> do {
> int ret;
>
> - if ((ret = avfilter_request_frame(link->src->inputs[0])))
> + if(!yadif->next && yadif->cur)
if (
> + return AVERROR_EOF;
> +
trailing whitespace
> + int ret = avfilter_request_frame(link->src->inputs[0]);
> +
> + if(ret == AVERROR_EOF && yadif->cur) {
if (
> + start_frame(link->src->inputs[0], NULL);
> + end_frame(link->src->inputs[0]);
> + }
> + else if(ret < 0) {
if (
And move the else up to the same line as the '}'.
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel