OSDN Git Service

Revert "lavfi/ebur128: fix format negociation for output."
authorClément Bœsch <ubitux@gmail.com>
Thu, 14 Mar 2013 05:25:20 +0000 (06:25 +0100)
committerClément Bœsch <ubitux@gmail.com>
Thu, 14 Mar 2013 05:25:20 +0000 (06:25 +0100)
This reverts commit 9efcfbed9dd64679145f5f39d9a812dfeea97172.

All the shame on me; this commit is actually causing more problems
(broken outputs but also crashes) than it was solving.

libavfilter/f_ebur128.c

index acf29d5..05ea630 100644 (file)
@@ -690,6 +690,22 @@ static int query_formats(AVFilterContext *ctx)
         outlink = ctx->outputs[1];
     }
 
+    /* set audio output formats (same as input since it's just a passthrough) */
+    formats = ff_make_format_list(sample_fmts);
+    if (!formats)
+        return AVERROR(ENOMEM);
+    ff_formats_ref(formats, &outlink->in_formats);
+
+    layouts = ff_all_channel_layouts();
+    if (!layouts)
+        return AVERROR(ENOMEM);
+    ff_channel_layouts_ref(layouts, &outlink->in_channel_layouts);
+
+    formats = ff_make_format_list(input_srate);
+    if (!formats)
+        return AVERROR(ENOMEM);
+    ff_formats_ref(formats, &outlink->in_samplerates);
+
     return 0;
 }