diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-27 01:52:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-15 01:59:38 +0200 |
commit | 2c2e72708831ca0cc76f72368676a8ccf624a2fe (patch) | |
tree | 83cc6aadf4443b2a4beb000f5475f55a044af7cc /libavdevice | |
parent | 175c19166824bd93b02f60c5178365014212366e (diff) | |
download | ffmpeg-2c2e72708831ca0cc76f72368676a8ccf624a2fe.tar.gz |
avdevice/dshow: check ff_dshow_pin_ConnectionMediaType() for failure
Maybe Fixes: CID1598557 Explicit null dereferenced
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Roger Pack <rogerdpack@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/dshow.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 5caf282aea..4581f9405c 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1546,7 +1546,10 @@ dshow_add_device(AVFormatContext *avctx, ctx->capture_filter[devtype]->stream_index = st->index; - ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type); + if (ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type) != S_OK) { + ret = AVERROR(EIO); + goto error; + } fmt_info = dshow_get_format_info(&type); if (!fmt_info) { ret = AVERROR(EIO); |