If regularly parsing new chan atoms (as in rtpdec_qt), but the
chan atoms don't actually contain any channel layout, don't reset
the value that the caller has filled in (by guessing).
---
This is an alternative solution to the patches for avconv/avplay.
---
 libavformat/mov_chan.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index b1fa13f..00a2a4b 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -579,9 +579,10 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, 
AVStream *st,
             label_mask |= mask_incr;
         }
     }
-    if (layout_tag == 0)
-        st->codec->channel_layout = label_mask;
-    else
+    if (layout_tag == 0) {
+        if (label_mask)
+            st->codec->channel_layout = label_mask;
+    } else
         st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, 
bitmap);
 
     return 0;
-- 
1.7.9.4

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to