[FFmpeg-cvslog] r25090 - trunk/ffmpeg.c
Thu Sep 9 23:04:02 CEST 2010
On Thu, Sep 09, 2010 at 10:58:13PM +0200, mstorsjo wrote:
> Author: mstorsjo
> Date: Thu Sep 9 22:58:13 2010
> New Revision: 25090
> Update the audio sample rate when doing lowres audio decoding, before opening the decoder
> Modified: trunk/ffmpeg.c
> --- trunk/ffmpeg.c Thu Sep 9 22:23:41 2010 (r25089)
> +++ trunk/ffmpeg.c Thu Sep 9 22:58:13 2010 (r25090)
> @@ -3241,6 +3241,11 @@ static void opt_input_file(const char *f
> input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(audio_codec_name);
> st->discard= AVDISCARD_ALL;
> + /* Note that av_find_stream_info can add more streams, and we
> + * currently have no chance of setting up lowres decoding
> + * early enough for them. */
> + if (dec->lowres)
> + audio_sample_rate >>= dec->lowres;
I really can't see how this kind of hack would belong here.
Like this every single application using FFmpeg would have to duplicate
this code (a fact that also is undocumented) in order to support lowres?
If yes that's not acceptable IMO, if no and only FFmpeg needs that IMO
FFmpeg is broken and needs to be fixed.
More information about the ffmpeg-cvslog