Commit deaf05ea authored by Sebastien Alaiwan's avatar Sebastien Alaiwan Committed by James Zern

Fix: correct framerate for 25Hz IVF file

Remove legacy workaround.
BUG=aomedia:85

Change-Id: I98ab7a3e3e88300586106982dc1fe3a023b361e0
parent b9b017d5
......@@ -20,19 +20,8 @@
static const char *IVF_SIGNATURE = "DKIF";
static void fix_framerate(int *num, int *den) {
// Some versions of aomenc used 1/(2*fps) for the timebase, so
// we can guess the framerate using only the timebase in this
// case. Other files would require reading ahead to guess the
// timebase, like we do for webm.
if (*den > 0 && *den < 1000000000 && *num > 0 && *num < 1000) {
// Correct for the factor of 2 applied to the timebase in the encoder.
if (*num & 1)
*den *= 2;
else
*num /= 2;
} else {
// Don't know FPS for sure, and don't have readahead code
// (yet?), so just default to 30fps.
if (*den <= 0 || *den >= 1000000000 || *num <= 0 || *num >= 1000) {
// framerate seems to be invalid, just default to 30fps.
*num = 30;
*den = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment