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:
authorAnton Khirnov <anton@khirnov.net>2019-05-29 10:36:27 +0300
committerJames Almer <jamrial@gmail.com>2022-03-15 15:42:43 +0300
commitd4b79b2e3272877714c092529d3584c61de82266 (patch)
treea194e307d9de0c5d4a7df1685475c0ae2fba1cc5 /libavcodec/mlp_parser.c
parent6d8b25841ca47a03abd1cab95be3ec5810bdf84f (diff)
mlp: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
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;