mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
(cherry picked from commit 2c2e727088
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2a0253d066
commit
672314f46f
@ -1545,7 +1545,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);
|
||||
|
Loading…
Reference in New Issue
Block a user