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; }