Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
On Mon, Oct 19, 2015 at 3:50 AM, Michael Niedermayerwrote: > On Sun, Oct 18, 2015 at 04:49:48PM +0200, Hendrik Leppkes wrote: >> On Wed, Sep 30, 2015 at 1:09 PM, Hendrik Leppkes 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, , _rate, >> > >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. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
On Sun, Oct 18, 2015 at 04:49:48PM +0200, Hendrik Leppkes wrote: > On Wed, Sep 30, 2015 at 1:09 PM, Hendrik Leppkeswrote: > > 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, , _rate, > > >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 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
On Wed, Sep 30, 2015 at 1:09 PM, Hendrik Leppkeswrote: > 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, , _rate, > >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. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
On Wed, 30 Sep 2015 13:09:01 +0200 Hendrik Leppkeswrote: > 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, , _rate, > >framesize)) { > s->duration= duration; > -avctx->sample_rate = sample_rate; > } else > s->duration = 0; > So in which situations do decoder and parser share the AVCodecContext at all? In libavformat? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
On Wed, Sep 30, 2015 at 1:16 PM, wm4wrote: > On Wed, 30 Sep 2015 13:09:01 +0200 > Hendrik Leppkes 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, , _rate, >> >framesize)) { >> s->duration= duration; >> -avctx->sample_rate = sample_rate; >> } else >> s->duration = 0; >> > > So in which situations do decoder and parser share the AVCodecContext > at all? In libavformat? Yes, and it results in probing reporting the wrong sample rate right now. - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] dca_parser: don't overwrite the sample rate, it may not be correct
Hendrik Leppkes gmail.com> writes: > 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, Please mention ticket #4397. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] 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. --- 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, , _rate, >framesize)) { s->duration= duration; -avctx->sample_rate = sample_rate; } else s->duration = 0; -- 2.5.3.windows.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel