[FFmpeg-cvslog] mov_chan: Only set the channel_layout if setting it to a nonzero value
Martin Storsjö
git at videolan.org
Sat Sep 8 13:01:30 CEST 2012
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Fri Sep 7 10:45:16 2012 +0300| [7b699d813681e4fad419ec63c96d595e98b2dbfa] | committer: Martin Storsjö
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 at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b699d813681e4fad419ec63c96d595e98b2dbfa
---
libavformat/mov_chan.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index b1fa13f..00a2a4b 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list