diff options
author | jbrjake <[email protected]> | 2007-11-10 01:51:36 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2007-11-10 01:51:36 +0000 |
commit | d95e8d52105a29a03750232c47949b37dc3075dc (patch) | |
tree | 94e4f7b25d65b692259241c7049dede3c9568ab7 /libhb/muxmp4.c | |
parent | 5e6725417750adb69ccbca26d1c7cbdbfd4fd142 (diff) |
First attempt at variable frame rate detelecining for NTSC video sources.
This check-in includes the library code as well as the CLI implementation.
Only works with MP4 and MKV, untested with high profile, results may vary with mixed content, consult a physician if condition persists for longer than four hours.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1051 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/muxmp4.c')
-rw-r--r-- | libhb/muxmp4.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c index 2f375e832..d279667ee 100644 --- a/libhb/muxmp4.c +++ b/libhb/muxmp4.c @@ -393,7 +393,14 @@ static int MP4Mux( hb_mux_object_t * m, hb_mux_data_t * mux_data, /* Because we use the audio samplerate as the timescale, we have to use potentially variable durations so the video doesn't go out of sync */ - duration = ( buf->stop * job->arate / 90000 ) - m->sum_dur; + if ( job->vfr ) + { + duration = ( ( buf->stop * job->arate / 90000 ) - ( buf->start * job->arate / 90000 ) ); + } + else + { + duration = ( buf->stop * job->arate / 90000 ) - m->sum_dur; + } m->sum_dur += duration; } else |