]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/mov.c
thp: set duration for audio stream too
[ffmpeg] / libavformat / mov.c
index 95dc1ee7ad91094f480878f869f4ab55a86945f2..9532213023d3b71b3389992dc331d81bc752656a 100644 (file)
@@ -200,6 +200,14 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
     if (ret < 0)
         return ret;
 
+    if (pkt.size >= 8 && id != AV_CODEC_ID_BMP) {
+        if (AV_RB64(pkt.data) == 0x89504e470d0a1a0a) {
+            id = AV_CODEC_ID_PNG;
+        } else {
+            id = AV_CODEC_ID_MJPEG;
+        }
+    }
+
     st->disposition              |= AV_DISPOSITION_ATTACHED_PIC;
 
     st->attached_pic              = pkt;