diff mbox series

[FFmpeg-devel] avformat/format: Improve const-correctness

Message ID AM7PR03MB6660443F98EB89F04951EB978FB19@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit baf89ab9a75f2c5cc1b9e9835e092278b4b978c6
Headers show
Series [FFmpeg-devel] avformat/format: Improve const-correctness | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 7, 2021, 9:37 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
Will apply this soon.

 libavformat/format.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/format.c b/libavformat/format.c
index cc214741bd..387627009e 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -52,7 +52,7 @@  const AVOutputFormat *av_guess_format(const char *short_name, const char *filena
                                       const char *mime_type)
 {
     const AVOutputFormat *fmt = NULL;
-    AVOutputFormat *fmt_found = NULL;
+    const AVOutputFormat *fmt_found = NULL;
     void *i = 0;
     int score_max, score;
 
@@ -78,7 +78,7 @@  const AVOutputFormat *av_guess_format(const char *short_name, const char *filena
         }
         if (score > score_max) {
             score_max = score;
-            fmt_found = (AVOutputFormat*)fmt;
+            fmt_found = fmt;
         }
     }
     return fmt_found;
@@ -121,7 +121,7 @@  const AVInputFormat *av_find_input_format(const char *short_name)
     void *i = 0;
     while ((fmt = av_demuxer_iterate(&i)))
         if (av_match_name(short_name, fmt->name))
-            return (AVInputFormat*)fmt;
+            return fmt;
     return NULL;
 }