You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
dca_parser: don't overwrite the sample rate, it may not be correct
The parser only reads the dca core sample rate, which is limited to a maximum of 48000 Hz, while X96 and HD extensions can increase the sample rate up to 192000 Hz. This change prevents the parser and decoder fighting over the sample rate, potentially confusing user applications. This also fixes sample rate display of >48000Hz files with ffmpeg/ffprobe when using libdcadec. Fixes ticket #4397
This commit is contained in:
@@ -166,7 +166,6 @@ static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
|||||||
/* read the duration and sample rate from the frame header */
|
/* read the duration and sample rate from the frame header */
|
||||||
if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {
|
if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {
|
||||||
s->duration = duration;
|
s->duration = duration;
|
||||||
avctx->sample_rate = sample_rate;
|
|
||||||
} else
|
} else
|
||||||
s->duration = 0;
|
s->duration = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user