Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r--libavcodec/mlp_parser.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 9fea7db955..d391390dd5 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -175,22 +175,18 @@ static int mlp_parse(AVCodecParserContext *s,
avctx->frame_size =
s->duration = mh.access_unit_size;
- if(!avctx->channels || !avctx->channel_layout) {
+ av_channel_layout_uninit(&avctx->ch_layout);
if (mh.stream_type == 0xbb) {
/* MLP stream */
- avctx->channels = mh.channels_mlp;
- avctx->channel_layout = mh.channel_layout_mlp;
+ av_channel_layout_from_mask(&avctx->ch_layout, mh.channel_layout_mlp);
} else { /* mh.stream_type == 0xba */
/* TrueHD stream */
if (!mh.channels_thd_stream2) {
- avctx->channels = mh.channels_thd_stream1;
- avctx->channel_layout = mh.channel_layout_thd_stream1;
+ av_channel_layout_from_mask(&avctx->ch_layout, mh.channel_layout_thd_stream1);
} else {
- avctx->channels = mh.channels_thd_stream2;
- avctx->channel_layout = mh.channel_layout_thd_stream2;
+ av_channel_layout_from_mask(&avctx->ch_layout, mh.channel_layout_thd_stream2);
}
}
- }
if (!mh.is_vbr) /* Stream is CBR */
avctx->bit_rate = mh.peak_bitrate;