mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/thd: fix special stereo support
This commit is contained in:
parent
8718f8cfaf
commit
a8a7c5d502
|
@ -408,7 +408,9 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
|
||||||
mh.stream_type);
|
mh.stream_type);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
if (mh.channel_modifier_thd_stream0 == THD_CH_MODIFIER_STEREO)
|
if (mh.channels_thd_stream1 == 2 &&
|
||||||
|
mh.channels_thd_stream2 == 2 &&
|
||||||
|
m->avctx->channels == 2)
|
||||||
m->substream[0].mask = AV_CH_LAYOUT_STEREO;
|
m->substream[0].mask = AV_CH_LAYOUT_STEREO;
|
||||||
if ((substr = (mh.num_substreams > 1)))
|
if ((substr = (mh.num_substreams > 1)))
|
||||||
m->substream[0].mask = AV_CH_LAYOUT_STEREO;
|
m->substream[0].mask = AV_CH_LAYOUT_STEREO;
|
||||||
|
|
|
@ -626,7 +626,7 @@ static av_cold int mlp_encode_init(AVCodecContext *avctx)
|
||||||
ctx->ch_modifier_thd0 = 0;
|
ctx->ch_modifier_thd0 = 0;
|
||||||
ctx->ch_modifier_thd1 = 0;
|
ctx->ch_modifier_thd1 = 0;
|
||||||
ctx->ch_modifier_thd2 = 0;
|
ctx->ch_modifier_thd2 = 0;
|
||||||
ctx->channel_arrangement = 0;
|
ctx->channel_arrangement = 1;
|
||||||
break;
|
break;
|
||||||
case AV_CH_LAYOUT_5POINT0_BACK:
|
case AV_CH_LAYOUT_5POINT0_BACK:
|
||||||
ctx->ch_modifier_thd0 = 1;
|
ctx->ch_modifier_thd0 = 1;
|
||||||
|
|
Loading…
Reference in New Issue