]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mov_chan.c
smoothstreamingenc: explict cast to avoid overflow
[ffmpeg] / libavformat / mov_chan.c
index 800bb102a037d31862612e8d3eef51f51249a44e..aa7ba1079f9c7e227533ef60c06839ddbe834751 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <stdint.h>
 
-#include "libavutil/audioconvert.h"
+#include "libavutil/channel_layout.h"
 #include "libavcodec/avcodec.h"
 #include "mov_chan.h"
 
@@ -579,9 +579,10 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
             label_mask |= mask_incr;
         }
     }
-    if (layout_tag == 0)
+    if (layout_tag == 0) {
+        if (label_mask)
             st->codec->channel_layout = label_mask;
-    else
+    else
         st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, bitmap);
 
     return 0;