summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-12-14 03:23:45 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-12-14 03:23:45 +0000
commit22b16e6a5db14f6b10525fab69e1c0b58cfa899b (patch)
treedf0eaebaf8e4f467f60c7958c60d3ed103386d1d /ffmpeg.c
parentb3e88ae84bddfc80c2ec760d14359febb54f4e8f (diff)
Factorize ic->streams[i] out,
change from ffmbc Originally committed as revision 20852 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 2974edd177..63aa053a19 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2921,7 +2921,8 @@ static void opt_input_file(const char *filename)
/* update the current parameters so that they match the one of the input stream */
for(i=0;i<ic->nb_streams;i++) {
- AVCodecContext *enc = ic->streams[i]->codec;
+ AVStream *st = ic->streams[i];
+ AVCodecContext *enc = st->codec;
if(thread_count>1)
avcodec_thread_init(enc, thread_count);
enc->thread_count= thread_count;
@@ -2935,7 +2936,7 @@ static void opt_input_file(const char *filename)
audio_sample_fmt = enc->sample_fmt;
input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(audio_codec_name);
if(audio_disable)
- ic->streams[i]->discard= AVDISCARD_ALL;
+ st->discard= AVDISCARD_ALL;
break;
case CODEC_TYPE_VIDEO:
set_context_opts(enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
@@ -2971,16 +2972,16 @@ static void opt_input_file(const char *filename)
input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(video_codec_name);
if(video_disable)
- ic->streams[i]->discard= AVDISCARD_ALL;
+ st->discard= AVDISCARD_ALL;
else if(video_discard)
- ic->streams[i]->discard= video_discard;
+ st->discard= video_discard;
break;
case CODEC_TYPE_DATA:
break;
case CODEC_TYPE_SUBTITLE:
input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name);
if(subtitle_disable)
- ic->streams[i]->discard = AVDISCARD_ALL;
+ st->discard = AVDISCARD_ALL;
break;
case CODEC_TYPE_ATTACHMENT:
case CODEC_TYPE_UNKNOWN: