History

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

Hendrik Leppkes committed 11 years ago

Commit 00ae5b41 parent de1b1a71 file · +0 −1Browse files

Unified · Split

libavcodec/dca_parser.c+0−1
@@ -166,7 +166,6 @@ static int dca_parse(AVCodecParserContext *s, AVCodecContext *avctx, · 165 unmodified lines
166166 /* read the duration and sample rate from the frame header */
167167 if (!dca_parse_params(buf, buf_size, &duration, &sample_rate, &pc1->framesize)) {
168168 s->duration = duration;
169− avctx->sample_rate = sample_rate;
170169 } else
171170 s->duration = 0;
172171

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t