[SCM] libav/experimental: Update the audio sample rate when doing lowres audio decoding, before opening the decoder
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:15:36 UTC 2013
The following commit has been merged in the experimental branch:
commit 2dfa7c72cede04f95c4989099bcebfeeed68455b
Author: Martin Storsjö <martin at martin.st>
Date: Thu Sep 9 20:58:13 2010 +0000
Update the audio sample rate when doing lowres audio decoding, before opening the decoder
Originally committed as revision 25090 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/ffmpeg.c b/ffmpeg.c
index f2f1067..da92581 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3241,6 +3241,11 @@ static void opt_input_file(const char *filename)
input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(audio_codec_name);
if(audio_disable)
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;
break;
case AVMEDIA_TYPE_VIDEO:
set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list