summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-03-16 19:30:01 +0000
committerjstebbins <[email protected]>2014-03-16 19:30:01 +0000
commiteb6e020a90911b79ec8708a15b7d5c0fbc8d2576 (patch)
treed2dc98e2c577bc695e0cb85c7563b9d7bdea7963 /libhb
parent72bfc321e2bcc2842a5c0bf23e4a91f41d39cbfa (diff)
libhb: fix fps calculation when number of previews is very small
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6116 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index 3ae8e9ac9..0e601bb1d 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -831,12 +831,12 @@ skip_preview:
title->rate_base = vid_info.rate_base;
if( vid_info.rate_base == 900900 )
{
- if( pulldown_count >= npreviews / 4 )
+ if( npreviews >= 4 && pulldown_count >= npreviews / 4 )
{
title->rate_base = 1126125;
hb_deep_log( 2, "Pulldown detected, setting fps to 23.976" );
}
- if( progressive_count >= npreviews / 2 )
+ if( npreviews >= 2 && progressive_count >= npreviews / 2 )
{
// We've already deduced that the frame rate is 23.976,
// so set it back again.
@@ -844,7 +844,7 @@ skip_preview:
hb_deep_log( 2, "Title's mostly NTSC Film, setting fps to 23.976" );
}
}
- if( doubled_frame_count >= 3 * npreviews / 4 )
+ if( npreviews >= 2 && doubled_frame_count >= 3 * npreviews / 4 )
{
// We've detected that a significant number of the frames
// have been doubled in duration by repeat flags.