[FFmpeg-cvslog] mlp_parser: dont override existing channel geometry.
Michael Niedermayer
git at videolan.org
Tue Sep 25 23:00:31 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 25 22:35:26 2012 +0200| [2a672652bb70fe6ae1c711f80678f9a513732ee1] | committer: Michael Niedermayer
mlp_parser: dont override existing channel geometry.
This prevents race conditions
And partly fixes Ticket1726
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a672652bb70fe6ae1c711f80678f9a513732ee1
---
libavcodec/mlp_parser.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 7c0630c..5fb1424 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -317,6 +317,7 @@ static int mlp_parse(AVCodecParserContext *s,
avctx->sample_rate = mh.group1_samplerate;
s->duration = mh.access_unit_size;
+ if(!avctx->channels || !avctx->channel_layout) {
if (mh.stream_type == 0xbb) {
/* MLP stream */
avctx->channels = mlp_channels[mh.channels_mlp];
@@ -331,6 +332,7 @@ static int mlp_parse(AVCodecParserContext *s,
avctx->channel_layout = ff_truehd_layout(mh.channels_thd_stream1);
}
}
+ }
if (!mh.is_vbr) /* Stream is CBR */
avctx->bit_rate = mh.peak_bitrate;
More information about the ffmpeg-cvslog
mailing list