summaryrefslogtreecommitdiff
path: root/libavcodec/dca_parser.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-30 13:09:01 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-10-20 13:02:18 +0200
commit00ae5b401b24592a9f7019baada5b349152ee2fc (patch)
treee308342eb75667bdec299169971aab5aa0e2894a /libavcodec/dca_parser.c
parentde1b1a7da9e6ddf42447271e519099a88b389e4a (diff)
downloadffmpeg-00ae5b401b24592a9f7019baada5b349152ee2fc.tar.gz
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
Diffstat (limited to 'libavcodec/dca_parser.c')
-rw-r--r--libavcodec/dca_parser.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
index 337a99d2cb..70e64a89b8 100644
--- a/libavcodec/dca_parser.c
+++ b/libavcodec/dca_parser.c
@@ -166,7 +166,6 @@ static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx,
/* read the duration and sample rate from the frame header */
if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {
s->duration = duration;
- avctx->sample_rate = sample_rate;
} else
s->duration = 0;