[FFmpeg-cvslog] lavfi/buffersrc: set channel layout if it is known.

Nicolas George git at videolan.org
Sun Mar 17 14:35:10 CET 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Thu Mar 14 19:52:59 2013 +0100| [3cd342636fa245185fce7f4d6709a7a954f05ef8] | committer: Nicolas George

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

Introduced in 01649c7, lost in the API change.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3cd342636fa245185fce7f4d6709a7a954f05ef8
---

 libavfilter/buffersrc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index 54a58fe..af66130 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -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;



More information about the ffmpeg-cvslog mailing list