avcodec/mjpegdec: Improve intel jpeg flip heuristic
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 5 Jun 2014 23:32:22 +0000 (01:32 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Mon, 9 Jun 2014 21:51:24 +0000 (23:51 +0200)
Fixes Ticket3698

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0545ef7116db1e87894d978bfa400578652c716d)

libavcodec/mjpegdec.c

index 2c79da5..b498d0f 100644 (file)
@@ -1718,7 +1718,7 @@ static int mjpeg_decode_com(MJpegDecodeContext *s)
                 parse_avid(s, cbuf, len);
             } else if (!strcmp(cbuf, "CS=ITU601"))
                 s->cs_itu601 = 1;
-            else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32)) ||
+            else if ((!strncmp(cbuf, "Intel(R) JPEG Library, version 1", 32) && s->avctx->codec_tag) ||
                      (!strncmp(cbuf, "Metasoft MJPEG Codec", 20)))
                 s->flipped = 1;