diff mbox series

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

Message ID 20230722192957.703-4-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/6] configure: libavradio support | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer July 22, 2023, 7:29 p.m. UTC
This avoids keeping diffs for libavdevice in the libavradio repository

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

Patch

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;
     }