summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/mov_chan.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index b1fa13f753..00a2a4bb92 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;