Merge "ivfdec: tolerate invalid framerates (2)"
This commit is contained in:
2
ivfdec.c
2
ivfdec.c
@@ -23,7 +23,7 @@ static void fix_framerate(int *num, int *den) {
|
|||||||
// we can guess the framerate using only the timebase in this
|
// we can guess the framerate using only the timebase in this
|
||||||
// case. Other files would require reading ahead to guess the
|
// case. Other files would require reading ahead to guess the
|
||||||
// timebase, like we do for webm.
|
// timebase, like we do for webm.
|
||||||
if (*den > 0 && *num > 0 && *num < 1000) {
|
if (*den > 0 && *den < 1000000000 && *num > 0 && *num < 1000) {
|
||||||
// Correct for the factor of 2 applied to the timebase in the encoder.
|
// Correct for the factor of 2 applied to the timebase in the encoder.
|
||||||
if (*num & 1)
|
if (*num & 1)
|
||||||
*den *= 2;
|
*den *= 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user