mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
mov_chan: Only set the channel_layout if setting it to a nonzero value
If regularly parsing new chan atoms (as in rtpdec_qt), but the chan atoms don't actually contain any channel layout, don't reset the value that the caller has filled in (by guessing). Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user