[FFmpeg-devel] [PATCH 4/6] avdevice/utils: add test for AV_CLASS_CATEGORY_RADIO_INPUT

Michael Niedermayer michael at niedermayer.cc
Sat Jul 22 22:29:55 EEST 2023


This avoids keeping diffs for libavdevice in the libavradio repository

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavdevice/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/utils.c b/libavdevice/utils.c
index d9a52c53ab..faa24fa74d 100644
--- a/libavdevice/utils.c
+++ b/libavdevice/utils.c
@@ -33,7 +33,7 @@ int ff_alloc_input_device_context(AVFormatContext **avctx, const AVInputFormat *
 
     if (!iformat)
         iformat = av_find_input_format(format);
-    if (!iformat || !iformat->priv_class || !AV_IS_INPUT_DEVICE(iformat->priv_class->category)) {
+    if (!iformat || !iformat->priv_class || (!AV_IS_INPUT_DEVICE(iformat->priv_class->category) && iformat->priv_class->category != AV_CLASS_CATEGORY_RADIO_INPUT)) {
         ret = AVERROR(EINVAL);
         goto error;
     }
-- 
2.17.1



More information about the ffmpeg-devel mailing list