1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

fftools/ffmpeg: do not assume input streams exist

There can be zero input streams, with input provided by lavfi complex
filtergraphs.
This commit is contained in:
Anton Khirnov 2022-11-17 09:53:39 +01:00
parent fd8bf8d3b5
commit 005f4e1caf

View File

@ -3401,7 +3401,11 @@ static int check_keyboard_interaction(int64_t cur_time)
if (key == 'd' || key == 'D'){
int debug=0;
if(key == 'D') {
debug = ist_iter(NULL)->dec_ctx->debug << 1;
InputStream *ist = ist_iter(NULL);
if (ist)
debug = ist->dec_ctx->debug << 1;
if(!debug) debug = 1;
while (debug & FF_DEBUG_DCT_COEFF) //unsupported, would just crash
debug += debug;