History

ffmpeg_opts: remove lowres check

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.

James Almer committed 5 years ago

Commit a423bc91 parent f07a8b11 file · +0 −9Browse files

Unified · Split

fftools/ffmpeg_opt.c+0−9
@@ -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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t