diff mbox series

[FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function

Message ID PR3PR03MB6665915DC4848EEF7A53AF378FAA9@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 3a82bb8128773b82f50194cad6b3f3405084f59c
Headers show
Series [FFmpeg-devel,001/218] avfilter/f_reverse: Don't use redundant query_formats function | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 30, 2021, 1:25 p.m. UTC
Said function did exactly what ff_default_query_formats() does
for audio; so just remove it, so that ff_default_query_formats()
will be called.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/f_reverse.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Paul B Mahol Oct. 1, 2021, 8:55 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c
index 82f0c705a2..0398aa9cb0 100644
--- a/libavfilter/f_reverse.c
+++ b/libavfilter/f_reverse.c
@@ -145,19 +145,6 @@  const AVFilter ff_vf_reverse = {
 
 #if CONFIG_AREVERSE_FILTER
 
-static int query_formats(AVFilterContext *ctx)
-{
-    int ret = ff_set_common_all_channel_counts(ctx);
-    if (ret < 0)
-        return ret;
-
-    ret = ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_AUDIO));
-    if (ret < 0)
-        return ret;
-
-    return ff_set_common_all_samplerates(ctx);
-}
-
 static void reverse_samples_planar(AVFrame *out)
 {
     for (int p = 0; p < out->channels; p++) {
@@ -283,7 +270,6 @@  static const AVFilterPad areverse_outputs[] = {
 const AVFilter ff_af_areverse = {
     .name          = "areverse",
     .description   = NULL_IF_CONFIG_SMALL("Reverse an audio clip."),
-    .query_formats = query_formats,
     .priv_size     = sizeof(ReverseContext),
     .init          = init,
     .uninit        = uninit,