[FFmpeg-cvslog] fftools/ffmpeg_filter: constify the argument of filtergraph_is_simple()
Anton Khirnov
git at videolan.org
Wed May 31 17:26:23 EEST 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed May 24 12:39:47 2023 +0200| [2674532eeed14f0b82fa027da7b2b3389bc8faaf] | committer: Anton Khirnov
fftools/ffmpeg_filter: constify the argument of filtergraph_is_simple()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2674532eeed14f0b82fa027da7b2b3389bc8faaf
---
fftools/ffmpeg.h | 2 +-
fftools/ffmpeg_filter.c | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 655b5c7ec5..966397270d 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -731,7 +731,7 @@ int parse_and_set_vsync(const char *arg, int *vsync_var, int file_idx, int st_id
int configure_filtergraph(FilterGraph *fg);
void check_filter_outputs(void);
-int filtergraph_is_simple(FilterGraph *fg);
+int filtergraph_is_simple(const FilterGraph *fg);
int init_simple_filtergraph(InputStream *ist, OutputStream *ost,
char *graph_desc);
int init_complex_filtergraph(FilterGraph *fg);
diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 42bb4c7348..2cf3c891ce 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -54,6 +54,11 @@ static FilterGraphPriv *fgp_from_fg(FilterGraph *fg)
return (FilterGraphPriv*)fg;
}
+static const FilterGraphPriv *cfgp_from_cfg(const FilterGraph *fg)
+{
+ return (const FilterGraphPriv*)fg;
+}
+
typedef struct InputFilterPriv {
InputFilter ifilter;
@@ -1674,9 +1679,9 @@ static int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *fr
return 0;
}
-int filtergraph_is_simple(FilterGraph *fg)
+int filtergraph_is_simple(const FilterGraph *fg)
{
- FilterGraphPriv *fgp = fgp_from_fg(fg);
+ const FilterGraphPriv *fgp = cfgp_from_cfg(fg);
return fgp->is_simple;
}
More information about the ffmpeg-cvslog
mailing list