diff mbox

[FFmpeg-devel] avfilter/vf_fps: Avoid inlink fifo build up.

Message ID 20190829021320.112578-1-nbowe@google.com
State Accepted
Commit b794df43f3a521985f27d40974316db40b64cc88
Headers show

Commit Message

Niki Bowe Aug. 29, 2019, 2:13 a.m. UTC
When duplicating frames we need to schedule for activation again, otherwise frames can build up in the inlink fifo.
---
 libavfilter/vf_fps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thierry Foucu Sept. 8, 2019, 10:19 p.m. UTC | #1
ping?

On Wed, Aug 28, 2019 at 7:14 PM Nikolas Bowe <nbowe-at-google.com@ffmpeg.org>
wrote:

> When duplicating frames we need to schedule for activation again,
> otherwise frames can build up in the inlink fifo.
> ---
>  libavfilter/vf_fps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
> index 6b99f20d2b..cf1e36726a 100644
> --- a/libavfilter/vf_fps.c
> +++ b/libavfilter/vf_fps.c
> @@ -256,7 +256,7 @@ static int write_frame(AVFilterContext *ctx,
> FPSContext *s, AVFilterLink *outlin
>          av_log(ctx, AV_LOG_DEBUG, "Writing frame with pts %"PRId64" to
> pts %"PRId64"\n",
>                 s->frames[0]->pts, frame->pts);
>          s->cur_frame_out++;
> -
> +        *again = 1;
>          return ff_filter_frame(outlink, frame);
>      }
>  }
> --
> 2.23.0.187.g17f5b7556c-goog
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Paul B Mahol Sept. 9, 2019, 7:19 a.m. UTC | #2
lgtm

On 8/29/19, Nikolas Bowe <nbowe-at-google.com@ffmpeg.org> wrote:
> When duplicating frames we need to schedule for activation again, otherwise
> frames can build up in the inlink fifo.
> ---
>  libavfilter/vf_fps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
> index 6b99f20d2b..cf1e36726a 100644
> --- a/libavfilter/vf_fps.c
> +++ b/libavfilter/vf_fps.c
> @@ -256,7 +256,7 @@ static int write_frame(AVFilterContext *ctx, FPSContext
> *s, AVFilterLink *outlin
>          av_log(ctx, AV_LOG_DEBUG, "Writing frame with pts %"PRId64" to pts
> %"PRId64"\n",
>                 s->frames[0]->pts, frame->pts);
>          s->cur_frame_out++;
> -
> +        *again = 1;
>          return ff_filter_frame(outlink, frame);
>      }
>  }
> --
> 2.23.0.187.g17f5b7556c-goog
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Michael Niedermayer Sept. 10, 2019, 2:25 p.m. UTC | #3
On Mon, Sep 09, 2019 at 09:19:06AM +0200, Paul B Mahol wrote:
> lgtm

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 6b99f20d2b..cf1e36726a 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -256,7 +256,7 @@  static int write_frame(AVFilterContext *ctx, FPSContext *s, AVFilterLink *outlin
         av_log(ctx, AV_LOG_DEBUG, "Writing frame with pts %"PRId64" to pts %"PRId64"\n",
                s->frames[0]->pts, frame->pts);
         s->cur_frame_out++;
-
+        *again = 1;
         return ff_filter_frame(outlink, frame);
     }
 }