]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avidec.c
avformat: add gif pipe demuxer
[ffmpeg] / libavformat / avidec.c
index 3ff515d492f96b6dfaad7553d98ca658e32fdc35..3f074795a75ebf1fc4fd1bef247b468daa9102bc 100644 (file)
@@ -670,7 +670,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
             st->start_time = 0;
             avio_rl32(pb); /* buffer size */
             avio_rl32(pb); /* quality */
-            if (ast->cum_len*ast->scale/ast->rate > 3600) {
+            if (ast->cum_len > 3600LL * ast->rate / ast->scale) {
                 av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
                 ast->cum_len = 0;
             }
@@ -1231,6 +1231,11 @@ start_sync:
             goto start_sync;
         }
 
+        if (d[2] == 'w' && d[3] == 'c' && n < s->nb_streams) {
+            avio_skip(pb, 16 * 3 + 8);
+            goto start_sync;
+        }
+
         if (avi->dv_demux && n != 0)
             continue;