diff options
author | Mina Nagy Zaki <mnzaki@gmail.com> | 2011-06-19 20:31:24 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-19 22:58:32 +0200 |
commit | fd2c0a5db242a3c89a89f1dd2ae9e3155e48f9e2 (patch) | |
tree | 304f7ccb5772ff319728ba6cc99ada72bd579c9e /libavfilter/avfiltergraph.c | |
parent | 527ca3985c736ffe077a82fdf3616f0fd571b923 (diff) | |
download | ffmpeg-fd2c0a5db242a3c89a89f1dd2ae9e3155e48f9e2.tar.gz |
lavfi: add layout negotiation fields and helper functions.
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r-- | libavfilter/avfiltergraph.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 60d529ba73..04768617de 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -195,9 +195,16 @@ static void pick_format(AVFilterLink *link) link->in_formats->format_count = 1; link->format = link->in_formats->formats[0]; - avfilter_formats_unref(&link->in_formats); avfilter_formats_unref(&link->out_formats); + + if (link->type == AVMEDIA_TYPE_AUDIO) { + link->in_chlayouts->format_count = 1; + link->channel_layout = link->in_chlayouts->formats[0]; + avfilter_formats_unref(&link->in_chlayouts); + avfilter_formats_unref(&link->out_chlayouts); + } + } static void pick_formats(AVFilterGraph *graph) |