Browse code

lavfi/buffersrc: set channel layout if it is known.

Introduced in 01649c7, lost in the API change.

Nicolas George authored on 2013/03/15 03:52:59
Showing 1 changed files
... ...
@@ -134,6 +134,9 @@ static int attribute_align_arg av_buffersrc_add_frame_internal(AVFilterContext *
134 134
                                  frame->format);
135 135
         break;
136 136
     case AVMEDIA_TYPE_AUDIO:
137
+        /* For layouts unknown on input but known on link after negotiation. */
138
+        if (!frame->channel_layout)
139
+            frame->channel_layout = s->channel_layout;
137 140
         CHECK_AUDIO_PARAM_CHANGE(ctx, s, frame->sample_rate, frame->channel_layout,
138 141
                                  frame->format);
139 142
         break;