[FFmpeg-devel] [PATCH 09/20] avformat/sccdec: Make constants more intelligible

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


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

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 0b3e1ab74c..ea9f014cf2 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -51,9 +51,9 @@ static int scc_probe(const AVProbeData *p)
 static int convert(uint8_t x)
 {
     if (x >= 'a')
-        x -= 87;
+        x -= 'a' - 10;
     else if (x >= 'A')
-        x -= 55;
+        x -= 'A' - 10;
     else
         x -= '0';
     return x;
-- 
2.30.2



More information about the ffmpeg-devel mailing list