]> git.sesse.net Git - ffmpeg/commitdiff
avformat/jacosubdec: Fix unintended fallthrough
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 29 Oct 2020 12:36:22 +0000 (13:36 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 30 Oct 2020 13:06:19 +0000 (14:06 +0100)
Regression since 715ff75e5dbbbefff7337351db596a9b7a5d4379.

Fixes Coverity issues #1468654 and #1468656.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/jacosubdec.c

index e70ceeaafd6820a8c375879541e4f11575a69da5..14221b166c191662f34f9e0da786713a5f741c7c 100644 (file)
@@ -148,9 +148,15 @@ static int get_shift(int timeres, const char *buf)
 
     ret = 0;
     switch (n) {
-    case 4: ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d);
-    case 3: ret = sign * ((         (int64_t)a*60 + b) * timeres + c);
-    case 2: ret = sign * ((                (int64_t)a) * timeres + b);
+    case 4:
+        ret = sign * (((int64_t)a*3600 + b*60 + c) * timeres + d);
+        break;
+    case 3:
+        ret = sign * ((         (int64_t)a*60 + b) * timeres + c);
+        break;
+    case 2:
+        ret = sign * ((                (int64_t)a) * timeres + b);
+        break;
     }
     if ((int)ret != ret)
         ret = 0;