summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-05-02 23:33:19 +0000
committerRodeo <[email protected]>2012-05-02 23:33:19 +0000
commit4d2cc69e229da90cca0be5af0463a2d67f919d90 (patch)
tree0828940ba9125afdb4df700d6d84d7e0a2a0701c /libhb/scan.c
parentabc27a62aadd83e0f67ffae109d86d80b2d626c3 (diff)
Scan: fix some 24000/1001 sources being detected as "almost" 24000/1001, using is_close_to().
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4631 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/scan.c')
-rw-r--r--libhb/scan.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libhb/scan.c b/libhb/scan.c
index ad9556528..1f222ac7a 100644
--- a/libhb/scan.c
+++ b/libhb/scan.c
@@ -856,9 +856,20 @@ skip_preview:
title->height = vid_info.height;
if ( vid_info.rate && vid_info.rate_base )
{
+ // if the frame rate is very close to one of our "common" framerates,
+ // assume it actually is said frame rate; e.g. some 24000/1001 sources
+ // may have a rate_base of 1126124 (instead of 1126125)
+ for( i = 0; i < hb_video_rates_count; i++ )
+ {
+ if( is_close_to( vid_info.rate_base, hb_video_rates[i].rate, 100 ) )
+ {
+ vid_info.rate_base = hb_video_rates[i].rate;
+ break;
+ }
+ }
title->rate = vid_info.rate;
title->rate_base = vid_info.rate_base;
- if( is_close_to( vid_info.rate_base, 900900, 100 ) )
+ if( vid_info.rate_base == 900900 )
{
if( pulldown_count >= npreviews / 4 )
{