return tag;
}
-int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size)
+int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
+ int64_t size)
{
- AVIOContext *pb = s->pb;
uint32_t layout_tag, bitmap, num_descr, label_mask;
int i;
avio_rl32(pb); // mCoordinates[0]
avio_rl32(pb); // mCoordinates[1]
avio_rl32(pb); // mCoordinates[2]
+ size -= 20;
if (layout_tag == 0) {
uint32_t mask_incr = mov_get_channel_label(label);
if (mask_incr == 0) {
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);
+ avio_skip(pb, size - 12);
return 0;
}