[FFmpeg-cvslog] r20852 - trunk/ffmpeg.c
michael
subversion
Mon Dec 14 04:23:45 CET 2009
Author: michael
Date: Mon Dec 14 04:23:45 2009
New Revision: 20852
Log:
Factorize ic->streams[i] out,
change from ffmbc
Modified:
trunk/ffmpeg.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Mon Dec 14 02:15:02 2009 (r20851)
+++ trunk/ffmpeg.c Mon Dec 14 04:23:45 2009 (r20852)
@@ -2921,7 +2921,8 @@ static void opt_input_file(const char *f
/* 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 *f
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 *f
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:
More information about the ffmpeg-cvslog
mailing list