aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2022-03-28 11:33:37 -0300
committerJames Almer <jamrial@gmail.com>2022-04-05 09:19:58 -0300
commit603f2245d4d0ee40d4c7e2192648127999fb0fbd (patch)
tree8b3b7418b8f054550c24ec7620d297143473329a
parent90ef712de56147d127fa06fef176b60c873de929 (diff)
downloadffmpeg-603f2245d4d0ee40d4c7e2192648127999fb0fbd.tar.gz
avformat/mov_chan: add a few missing channel label mappings
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavformat/mov_chan.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 4607540297..98773bb460 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -485,12 +485,18 @@ static uint64_t mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
return layout_map[i].layout;
}
-static uint32_t mov_get_channel_mask(uint32_t label)
+static uint64_t mov_get_channel_mask(uint32_t label)
{
if (label == 0)
return 0;
if (label <= 18)
return 1U << (label - 1);
+ if (label == 35)
+ return AV_CH_WIDE_LEFT;
+ if (label == 36)
+ return AV_CH_WIDE_RIGHT;
+ if (label == 37)
+ return AV_CH_LOW_FREQUENCY_2;
if (label == 38)
return AV_CH_STEREO_LEFT;
if (label == 39)
@@ -557,8 +563,8 @@ uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id,
int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
int64_t size)
{
- uint32_t layout_tag, bitmap, num_descr, label_mask;
- uint64_t mask = 0;
+ uint32_t layout_tag, bitmap, num_descr;
+ uint64_t label_mask, mask = 0;
int i;
if (size < 12)
@@ -590,7 +596,7 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
avio_rl32(pb); // mCoordinates[2]
size -= 20;
if (layout_tag == 0) {
- uint32_t mask_incr = mov_get_channel_mask(label);
+ uint64_t mask_incr = mov_get_channel_mask(label);
if (mask_incr == 0) {
label_mask = 0;
break;