diff mbox series

[FFmpeg-devel] fftools/ffplay_renderer: declare function argument as const

Message ID 20231123143819.1227670-1-leo.izen@gmail.com
State Accepted
Commit 36980179a0065e119dcfeea26b37777f9cec7066
Headers show
Series [FFmpeg-devel] fftools/ffplay_renderer: declare function argument as const | 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

Leo Izen Nov. 23, 2023, 2:38 p.m. UTC
Declaring the function argument as const fixes a warning down the line
that the const parameter is stripped. We don't modify this argument.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
---
 fftools/ffplay_renderer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Zhao Zhili Nov. 27, 2023, 3:50 p.m. UTC | #1
> 在 2023年11月23日,下午10:38,Leo Izen <leo.izen@gmail.com> 写道:
> 
> Declaring the function argument as const fixes a warning down the line
> that the const parameter is stripped. We don't modify this argument.
> 
> Signed-off-by: Leo Izen <leo.izen@gmail.com>
> ---
> fftools/ffplay_renderer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fftools/ffplay_renderer.c b/fftools/ffplay_renderer.c
> index a57e4980eb..45ca84fa95 100644
> --- a/fftools/ffplay_renderer.c
> +++ b/fftools/ffplay_renderer.c
> @@ -133,7 +133,7 @@ static const char *optional_device_exts[] = {
>     "VK_MESA_video_decode_av1",
> };
> 
> -static inline int enable_debug(AVDictionary *opt)
> +static inline int enable_debug(const AVDictionary *opt)
> {
>     AVDictionaryEntry *entry = av_dict_get(opt, "debug", NULL, 0);
>     int debug = entry && strtol(entry->value, NULL, 10);
> --
> 2.42.1

Applied, thanks!

> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
diff mbox series

Patch

diff --git a/fftools/ffplay_renderer.c b/fftools/ffplay_renderer.c
index a57e4980eb..45ca84fa95 100644
--- a/fftools/ffplay_renderer.c
+++ b/fftools/ffplay_renderer.c
@@ -133,7 +133,7 @@  static const char *optional_device_exts[] = {
     "VK_MESA_video_decode_av1",
 };
 
-static inline int enable_debug(AVDictionary *opt)
+static inline int enable_debug(const AVDictionary *opt)
 {
     AVDictionaryEntry *entry = av_dict_get(opt, "debug", NULL, 0);
     int debug = entry && strtol(entry->value, NULL, 10);