Maybe Fixes: CID1598557 Explicit null dereferenced
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavdevice/dshow.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 645c33ea2e6..403e56fe135 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);
--
2.45.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".