ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Mon Mar 28 11:33:37 2022 -0300| [603f2245d4d0ee40d4c7e2192648127999fb0fbd] | committer: James Almer
avformat/mov_chan: add a few missing channel label mappings Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=603f2245d4d0ee40d4c7e2192648127999fb0fbd --- libavformat/mov_chan.c | 14 ++++++++++---- 1 file 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; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".