diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-25 02:58:13 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-04-27 10:43:14 -0300 |
commit | 8b3e6ce5f4ab1ebf3a54ff7e0ff440a1a5f842f7 (patch) | |
tree | 8a94a0ff9b7b0cc675175a18faed75600aeb0ec6 /libavdevice/alldevices.c | |
parent | d7e0d428faaa04e2fd850eca82f314ca2ad3dfe5 (diff) | |
download | ffmpeg-8b3e6ce5f4ab1ebf3a54ff7e0ff440a1a5f842f7.tar.gz |
avdevice/avdevice: Constify av_*_device_next API
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavdevice/alldevices.c')
-rw-r--r-- | libavdevice/alldevices.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index 92b27a1d14..f65317018a 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -68,7 +68,7 @@ void avdevice_register_all(void) avpriv_register_devices(outdev_list, indev_list); } -static void *next_input(const AVInputFormat *prev, AVClassCategory c2) +static const void *next_input(const AVInputFormat *prev, AVClassCategory c2) { const AVClass *pc; const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_INPUT; @@ -91,10 +91,10 @@ static void *next_input(const AVInputFormat *prev, AVClassCategory c2) continue; category = pc->category; } while (category != c1 && category != c2); - return (AVInputFormat *)fmt; + return fmt; } -static void *next_output(const AVOutputFormat *prev, AVClassCategory c2) +static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2) { const AVClass *pc; const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT; @@ -117,25 +117,25 @@ static void *next_output(const AVOutputFormat *prev, AVClassCategory c2) continue; category = pc->category; } while (category != c1 && category != c2); - return (AVOutputFormat *)fmt; + return fmt; } -AVInputFormat *av_input_audio_device_next(AVInputFormat *d) +const AVInputFormat *av_input_audio_device_next(const AVInputFormat *d) { return next_input(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT); } -AVInputFormat *av_input_video_device_next(AVInputFormat *d) +const AVInputFormat *av_input_video_device_next(const AVInputFormat *d) { return next_input(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT); } -AVOutputFormat *av_output_audio_device_next(AVOutputFormat *d) +const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d) { return next_output(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT); } -AVOutputFormat *av_output_video_device_next(AVOutputFormat *d) +const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d) { return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT); } |