diff mbox series

[FFmpeg-devel,09/10] avfilter/avfilter: Make ff_update_link_current_pts static

Message ID AM7PR03MB666090723A2DFA7E2109BF338FF89@AM7PR03MB6660.eurprd03.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,1/3] avfilter/avfilter: Fix leaks upon filter creation error | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Andreas Rheinhardt Aug. 11, 2021, 1:17 a.m. UTC
Only used here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.c | 10 ++++++----
 libavfilter/internal.h |  2 --
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Nicolas George Aug. 11, 2021, 8:27 a.m. UTC | #1
Andreas Rheinhardt (12021-08-11):
> Only used here.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  libavfilter/avfilter.c | 10 ++++++----
>  libavfilter/internal.h |  2 --
>  2 files changed, 6 insertions(+), 6 deletions(-)

LGTM.

And pre-LGTM to moving the function up to avoid the forward declaration
if you want later.

Regards,
diff mbox series

Patch

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 6925d99659..ef049fe9b6 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -47,6 +47,8 @@ 
 #include "libavutil/ffversion.h"
 const char av_filter_ffversion[] = "FFmpeg version " FFMPEG_VERSION;
 
+static void update_link_current_pts(AVFilterLink *link, int64_t pts);
+
 void ff_tlog_ref(void *ctx, AVFrame *ref, int end)
 {
     av_unused char buf[16];
@@ -220,7 +222,7 @@  void ff_avfilter_link_set_out_status(AVFilterLink *link, int status, int64_t pts
     av_assert0(!link->status_out);
     link->status_out = status;
     if (pts != AV_NOPTS_VALUE)
-        ff_update_link_current_pts(link, pts);
+        update_link_current_pts(link, pts);
     filter_unblock(link->dst);
     ff_filter_set_ready(link->src, 200);
 }
@@ -513,7 +515,7 @@  static int set_enable_expr(AVFilterContext *ctx, const char *expr)
     return 0;
 }
 
-void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
+static void update_link_current_pts(AVFilterLink *link, int64_t pts)
 {
     if (pts == AV_NOPTS_VALUE)
         return;
@@ -1340,7 +1342,7 @@  int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts
     if (!link->status_in)
         return *rstatus = 0;
     *rstatus = link->status_out = link->status_in;
-    ff_update_link_current_pts(link, link->status_in_pts);
+    update_link_current_pts(link, link->status_in_pts);
     *rpts = link->current_pts;
     return 1;
 }
@@ -1369,7 +1371,7 @@  int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min)
 
 static void consume_update(AVFilterLink *link, const AVFrame *frame)
 {
-    ff_update_link_current_pts(link, frame->pts);
+    update_link_current_pts(link, frame->pts);
     ff_inlink_process_commands(link, frame);
     link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame);
     link->frame_count_out++;
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 040ce6dee8..505d2d4952 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -199,8 +199,6 @@  av_warn_unused_result
 int ff_parse_channel_layout(int64_t *ret, int *nret, const char *arg,
                             void *log_ctx);
 
-void ff_update_link_current_pts(AVFilterLink *link, int64_t pts);
-
 /**
  * Set the status field of a link from the source filter.
  * The pts should reflect the timestamp of the status change,