The st->codec values are updated based on the lowres factor by avformat_find_stream_info() when it runs an instance of the decoder internally, and the same thing happens in ffmpeg.c when we open ist->dec_ctx with avcodec_open2(), so these assignments are redundant.
Unified · Split
| @@ -867,15 +867,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) · 866 unmodified lines | |||
| 867 | case AVMEDIA_TYPE_VIDEO: | 867 | case AVMEDIA_TYPE_VIDEO: |
| 868 | if(!ist->dec) | 868 | if(!ist->dec) |
| 869 | ist->dec = avcodec_find_decoder(par->codec_id); | 869 | ist->dec = avcodec_find_decoder(par->codec_id); |
| 870 | #if FF_API_LOWRES | ||
| 871 | if (st->codec->lowres) { | ||
| 872 | ist->dec_ctx->lowres = st->codec->lowres; | ||
| 873 | ist->dec_ctx->width = st->codec->width; | ||
| 874 | ist->dec_ctx->height = st->codec->height; | ||
| 875 | ist->dec_ctx->coded_width = st->codec->coded_width; | ||
| 876 | ist->dec_ctx->coded_height = st->codec->coded_height; | ||
| 877 | } | ||
| 878 | #endif | ||
| 879 | 870 | ||
| 880 | // avformat_find_stream_info() doesn't set this for us anymore. | 871 | // avformat_find_stream_info() doesn't set this for us anymore. |
| 881 | ist->dec_ctx->framerate = st->avg_frame_rate; | 872 | ist->dec_ctx->framerate = st->avg_frame_rate; |