The core substream header carries the source PCM resolution (source_pcm_res), but bits_per_raw_sample was always left at 0. Export the actual value so consumers of the decoded frame can tell the original bit depth of the DCA core stream.
Signed-off-by: Portisch <[email protected]> --- libavcodec/dca_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dca_core.c b/libavcodec/dca_core.c index cb1f7b7..6935a2c 100644 --- a/libavcodec/dca_core.c +++ b/libavcodec/dca_core.c @@ -2170,7 +2170,7 @@ static int filter_frame_float(DCACoreDecoder *s, AVFrame *frame) avctx->sample_rate = s->sample_rate << x96_synth; avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - avctx->bits_per_raw_sample = 0; + avctx->bits_per_raw_sample = s->source_pcm_res; frame->nb_samples = nsamples = (s->npcmblocks * DCA_PCMBLOCK_SAMPLES) << x96_synth; if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) -- 2.43.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
