[FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct

Hendrik Leppkes h.leppkes at gmail.com
Tue Oct 20 13:07:01 CEST 2015


On Mon, Oct 19, 2015 at 3:50 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Sun, Oct 18, 2015 at 04:49:48PM +0200, Hendrik Leppkes wrote:
>> On Wed, Sep 30, 2015 at 1:09 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>> > 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.
>> > ---
>> >  libavcodec/dca_parser.c | 1 -
>> >  1 file changed, 1 deletion(-)
>> >
>> > diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
>> > index 337a99d..70e64a8 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;
>> >
>> > --
>> > 2.5.3.windows.1
>> >
>>
>> Any further comments? Otherwise I'm going to push this soon.
>
> i think the patch is ok
>

Applied.


More information about the ffmpeg-devel mailing list