aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-19 18:03:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-19 18:09:57 +0200
commit73b9f31c74ccec359a917a9efc314a0cba1c29c7 (patch)
treee934734e3e4c11b380840ea971c63c03683f278b /libavcodec/mjpegdec.c
parent2f75dcdc1c89737d480d0bc303ee224cb6ccf6ec (diff)
downloadffmpeg-73b9f31c74ccec359a917a9efc314a0cba1c29c7.tar.gz
mjpeg_decode_com: remove redundant len checks
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index b933a712ea..b2802ffaab 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1501,14 +1501,14 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
av_log(s->avctx, AV_LOG_INFO, "comment: '%s'\n", cbuf);
/* buggy avid, it puts EOI only at every 10th frame */
- if (len > 3 && (!strncmp(cbuf, "AVID", 4))) {
+ if (!strncmp(cbuf, "AVID", 4)) {
s->buggy_avid = 1;
if (len > 14 && cbuf[12] == 1) /* 1 - NTSC, 2 - PAL */
s->interlace_polarity = 1;
} else if (!strcmp(cbuf, "CS=ITU601"))
s->cs_itu601 = 1;
- else if ((len > 31 && !strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) ||
- (len > 19 && !strncmp(cbuf, "Metasoft MJPEG Codec", 20)))
+ else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) ||
+ (!strncmp(cbuf, "Metasoft MJPEG Codec", 20)))
s->flipped = 1;
av_free(cbuf);