mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
libavformat/evcdec.c: add a check to ensure evc_frame_merge_bsf is present
While the inclusion of the bsf is forced by a configure check, it's better to not just have the code here assume filter will never be NULL. Fixes Coverity issue CID 1680305. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -104,6 +104,9 @@ static int evc_read_header(AVFormatContext *s)
|
||||
EVCDemuxContext *c = s->priv_data;
|
||||
int ret = 0;
|
||||
|
||||
if (!filter)
|
||||
return AVERROR_BUG;
|
||||
|
||||
st = avformat_new_stream(s, NULL);
|
||||
if (!st) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
|
||||
Reference in New Issue
Block a user