InputStream *ist = &input_streams[ist_index];
if (ist->decoding_needed) {
AVCodec *codec = ist->dec;
- if (!codec)
- codec = avcodec_find_decoder(ist->st->codec->codec_id);
if (!codec) {
snprintf(error, sizeof(error), "Decoder (codec id %d) not found for input stream #%d.%d",
ist->st->codec->codec_id, ist->file_index, ist->st->index);
ist->ts_scale = strtod(scale, NULL);
ist->dec = choose_codec(ic, st, dec->codec_type, codec_names);
+ if (!ist->dec)
+ ist->dec = avcodec_find_decoder(dec->codec_id);
switch (dec->codec_type) {
case AVMEDIA_TYPE_AUDIO: