[FFmpeg-cvslog] Do not detect jp2 images as mov files.

Carl Eugen Hoyos git at videolan.org
Sat Jul 5 04:26:54 CEST 2014


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Jul  4 21:13:40 2014 +0200| [d919fdd4f7e8bf5354e99780181cdaedcf879fa5] | committer: Carl Eugen Hoyos

Do not detect jp2 images as mov files.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d919fdd4f7e8bf5354e99780181cdaedcf879fa5
---

 libavformat/mov.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 03ed6d4..89ecc54 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3264,7 +3264,6 @@ static int mov_probe(AVProbeData *p)
         /* check for obvious tags */
         case MKTAG('m','o','o','v'):
             moov_offset = offset + 4;
-        case MKTAG('j','P',' ',' '): /* jpeg 2000 signature */
         case MKTAG('m','d','a','t'):
         case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */
         case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */
@@ -3274,6 +3273,9 @@ static int mov_probe(AVProbeData *p)
                  offset + 12 > (unsigned int)p->buf_size ||
                  AV_RB64(p->buf+offset + 8) == 0)) {
                 score = FFMAX(score, AVPROBE_SCORE_EXTENSION);
+            } else if (tag == MKTAG('f','t','y','p') &&
+                       AV_RL32(p->buf + offset + 8) == MKTAG('j','p','2',' ')) {
+                score = FFMAX(score, 5);
             } else {
                 score = AVPROBE_SCORE_MAX;
             }



More information about the ffmpeg-cvslog mailing list