[FFmpeg-cvslog] cmdutils: use macros for device test

Lukasz Marek git at videolan.org
Sun Dec 14 23:58:48 CET 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Sat Dec 13 19:54:39 2014 +0100| [00dc2859f050133bf273236bb1b45eb477a1e2ed] | committer: Lukasz Marek

cmdutils: use macros for device test

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00dc2859f050133bf273236bb1b45eb477a1e2ed
---

 cmdutils.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index b68dae9..4e0a406 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1213,12 +1213,7 @@ static int is_device(const AVClass *avclass)
 {
     if (!avclass)
         return 0;
-    return avclass->category == AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT ||
-           avclass->category == AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT ||
-           avclass->category == AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT ||
-           avclass->category == AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT ||
-           avclass->category == AV_CLASS_CATEGORY_DEVICE_OUTPUT ||
-           avclass->category == AV_CLASS_CATEGORY_DEVICE_INPUT;
+    return AV_IS_INPUT_DEVICE(avclass->category) || AV_IS_OUTPUT_DEVICE(avclass->category);
 }
 
 static int show_formats_devices(void *optctx, const char *opt, const char *arg, int device_only)



More information about the ffmpeg-cvslog mailing list