[FFmpeg-devel] [PATCH v4 09/22] avdevice/avdevice: clean up avdevice_capabilities_create
Diederick Niehorster
dcnieho at gmail.com
Fri Mar 25 16:10:28 EET 2022
Draw implementation in line with that of avdevice_list_devices
Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
---
libavdevice/avdevice.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavdevice/avdevice.c b/libavdevice/avdevice.c
index 2000e63bb2..24e14b84c9 100644
--- a/libavdevice/avdevice.c
+++ b/libavdevice/avdevice.c
@@ -113,11 +113,14 @@ 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));
if (!(*caps))
return AVERROR(ENOMEM);
--
2.28.0.windows.1
More information about the ffmpeg-devel
mailing list