Browse Source

mlp_parser: dont override existing channel geometry.

This prevents race conditions
And partly fixes Ticket1726

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
2a672652bb
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/mlp_parser.c

+ 2
- 0
libavcodec/mlp_parser.c View File

@@ -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;


Loading…
Cancel
Save