On Wed, Oct 24, 2012 at 01:34:00AM -0400, Justin Ruggles wrote: > On 10/24/2012 12:13 AM, Kostya Shishkov wrote: > > On Tue, Oct 23, 2012 at 05:43:18PM -0400, Justin Ruggles wrote: > >> --- > >> libavcodec/dca_parser.c | 3 +-- > >> 1 files changed, 1 insertions(+), 2 deletions(-) > >> > >> diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c > >> index 7e65d0b..ab235cf 100644 > >> --- a/libavcodec/dca_parser.c > >> +++ b/libavcodec/dca_parser.c > >> @@ -192,8 +192,7 @@ static int dca_parse(AVCodecParserContext * s, > >> /* read the duration and sample rate from the frame header */ > >> if (!dca_parse_params(buf, buf_size, &duration, &sample_rate)) { > >> s->duration = duration; > >> - if (!avctx->sample_rate) > >> - avctx->sample_rate = sample_rate; > >> + avctx->sample_rate = sample_rate; > >> } else > >> s->duration = 0; > >> > >> -- > > > > LGTM (I wonder what happens when we support extensions like X96k properly > > but > > that's outside the scope of this patch) > > I guess if the sample rate available at the parser level does not > accurately reflect the real sample rate then we just don't set it there > at all...
I guess it's better to set it and for decoder to change it if needed. But it's all bikeshed, let's wait till we get full-featured DTS decoder. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel