Browse Source

avformat/jacosubdec: Fix unintended fallthrough

Regression since 715ff75e5d.

Fixes Coverity issues #1468654 and #1468656.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
tags/n4.4
Andreas Rheinhardt 4 years ago
parent
commit
11ea0ed20e
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      libavformat/jacosubdec.c

+ 9
- 3
libavformat/jacosubdec.c View 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;


Loading…
Cancel
Save