1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02: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:
Martin Storsjö 2012-09-07 10:45:16 +03:00
parent 5f72bc02f8
commit 7b699d8136

View File

@ -579,9 +579,10 @@ int ff_mov_read_chan(AVFormatContext *s, AVIOContext *pb, AVStream *st,
label_mask |= mask_incr; label_mask |= mask_incr;
} }
} }
if (layout_tag == 0) if (layout_tag == 0) {
st->codec->channel_layout = label_mask; if (label_mask)
else st->codec->channel_layout = label_mask;
} else
st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, bitmap); st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, bitmap);
return 0; return 0;