shithub: libvpx

Download patch

ref: 4593866eb93118ab9b24539e3c364b91c5656210
parent: 1dcf09407727167359f835ef9c3cd51b02c9d80f
parent: a9e00cd451f8859dad335d64cb4c77d95b6a06b3
author: Frank Galligan <fgalligan@google.com>
date: Thu Oct 24 07:18:14 EDT 2013

Merge "vpxdec: Fix webm fps check."

--- a/vpxdec.c
+++ b/vpxdec.c
@@ -501,6 +501,15 @@
   unsigned int i;
   uint64_t     tstamp = 0;
 
+  /* Check to see if we can seek before we parse any data. */
+  if (nestegg_track_seek(input->nestegg_ctx, input->video_track, 0)) {
+    fprintf(stderr,
+            "WARNING: Failed to guess framerate (no Cues), set to 30fps.\n");
+    *fps_num = 30;
+    *fps_den = 1;
+    return 0;
+  }
+
   /* Guess the framerate. Read up to 1 second, or 50 video packets,
    * whichever comes first.
    */