[FFmpeg-devel] [PATCH 05/20] avformat/sccdec: Remove nonsense cast

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Oct 2 00:08:22 EEST 2021


In most contexts, arrays are automatically converted to a pointer
to their first element; taking the address of the array just yields
a pointer to an array of fixed-size arrays, which is not intended here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavformat/sccdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index e95fd881a3..592609eb88 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -120,7 +120,7 @@ static int scc_read_header(AVFormatContext *s)
         next_ts = (hh * 3600LL + mm * 60LL + ss) * 1000LL + fs * 33LL;
 
         pos = ff_text_pos(&tr);
-        lline = (char *)&line;
+        lline = line;
         lline += 12;
 
         for (i = 0; i < 4095; i += 3) {
-- 
2.30.2



More information about the ffmpeg-devel mailing list