diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-11-17 09:53:39 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-11-23 10:36:23 +0100 |
commit | 005f4e1caf9c0f20a50ccf58fbcd4b6b26853c9f (patch) | |
tree | e3b3d3aafffa5d01975d2ebc2e5de388d2f59d03 /fftools | |
parent | fd8bf8d3b52b683d203bfe02c6972e63199ac4f4 (diff) |
fftools/ffmpeg: do not assume input streams exist
There can be zero input streams, with input provided by lavfi complex
filtergraphs.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0944f56b80..c43c3ca3bc 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -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; |