Draw implementation in line with that of avdevice_list_devices Signed-off-by: Diederick Niehorster <dcni...@gmail.com> --- libavdevice/avdevice.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c index 371ec17d02..2e64d35cf5 100644 --- a/libavdevice/avdevice.c +++ b/libavdevice/avdevice.c @@ -98,12 +98,15 @@ int avdevice_capabilities_create(AVDeviceCapabilitiesQuery **caps, AVFormatConte AVDictionary **device_options) { int ret; - av_assert0(s && caps); + av_assert0(s); + av_assert0(caps); av_assert0(s->iformat || s->oformat); if ((s->oformat && !s->oformat->create_device_capabilities) || - (s->iformat && !s->iformat->create_device_capabilities)) + (s->iformat && !s->iformat->create_device_capabilities)) { + *caps = NULL; return AVERROR(ENOSYS); - *caps = av_mallocz(sizeof(**caps)); + } + *caps = av_mallocz(sizeof(AVDeviceCapabilitiesQuery)); if (!(*caps)) return AVERROR(ENOMEM); (*caps)->device_context = s; -- 2.28.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".