[FFmpeg-devel] [PATCH] lavc/ccaption_dec: fix always true condition
Clément Bœsch
u at pkh.me
Tue Jan 5 21:54:54 CET 2016
No idea why this wasn't ever detected by a static analyzer.
---
libavcodec/ccaption_dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index 4e478e0..94771d5 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -462,7 +462,7 @@ static int process_cc608(CCaptionSubContext *ctx, int64_t pts, uint8_t hi, uint8
#define COR3(var, with1, with2, with3) ( (var) == (with1) || (var) == (with2) || (var) == (with3) )
if ( hi == ctx->prev_cmd[0] && lo == ctx->prev_cmd[1]) {
/* ignore redundant command */
- } else if ( (hi == 0x10 && (lo >= 0x40 || lo <= 0x5f)) ||
+ } else if ( (hi == 0x10 && (lo >= 0x40 && lo <= 0x5f)) ||
( (hi >= 0x11 && hi <= 0x17) && (lo >= 0x40 && lo <= 0x7f) ) ) {
handle_pac(ctx, hi, lo);
} else if ( ( hi == 0x11 && lo >= 0x20 && lo <= 0x2f ) ||
--
2.6.4
More information about the ffmpeg-devel
mailing list