OSDN Git Service

lavfi/buffersrc: set channel layout if it is known.
authorNicolas George <nicolas.george@normalesup.org>
Thu, 14 Mar 2013 18:52:59 +0000 (19:52 +0100)
committerNicolas George <nicolas.george@normalesup.org>
Sun, 17 Mar 2013 10:59:51 +0000 (11:59 +0100)
Introduced in 01649c7, lost in the API change.

libavfilter/buffersrc.c

index 54a58fe..af66130 100644 (file)
@@ -134,6 +134,9 @@ static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *
                                  frame->format);
         break;
     case AVMEDIA_TYPE_AUDIO:
+        /* For layouts unknown on input but known on link after negotiation. */
+        if (!frame->channel_layout)
+            frame->channel_layout = s->channel_layout;
         CHECK_AUDIO_PARAM_CHANGE(ctx, s, frame->sample_rate, frame->channel_layout,
                                  frame->format);
         break;