diff options
author | Frank Galligan <fgalligan@google.com> | 2013-10-24 10:33:24 -0700 |
---|---|---|
committer | Frank Galligan <fgalligan@google.com> | 2013-10-24 10:37:14 -0700 |
commit | a9e00cd451f8859dad335d64cb4c77d95b6a06b3 (patch) | |
tree | ed29b498574e2e6ccc71c7a9c52f035f4185b051 | |
parent | 997e19092ece9026b68fba916df2da5c3c489e03 (diff) | |
download | libvpx-a9e00cd451f8859dad335d64cb4c77d95b6a06b3.tar libvpx-a9e00cd451f8859dad335d64cb4c77d95b6a06b3.tar.gz libvpx-a9e00cd451f8859dad335d64cb4c77d95b6a06b3.tar.bz2 libvpx-a9e00cd451f8859dad335d64cb4c77d95b6a06b3.zip |
vpxdec: Fix webm fps check.
If the webm file did not have a Cues then vpxdec would fail
when creating a y4m file. If there is no Cues element print
out a warning and set fps to 30.
Change-Id: Ieea7040265dfdac7dff4ccf917c6f756160a96bc
-rw-r--r-- | vpxdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -501,6 +501,15 @@ webm_guess_framerate(struct input_ctx *input, 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. */ |