summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/muxmp4.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/libhb/muxmp4.c b/libhb/muxmp4.c
index 989bb9607..0959c6e48 100644
--- a/libhb/muxmp4.c
+++ b/libhb/muxmp4.c
@@ -416,14 +416,8 @@ 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 */
- if ( job->vfr )
- {
- duration = ( ( buf->stop * job->arate / 90000 ) - ( buf->start * job->arate / 90000 ) );
- }
- else
- {
- duration = ( buf->stop * job->arate / 90000 ) - m->sum_dur;
- }
+ int64_t bias = ( buf->start * job->arate / 90000 ) - m->sum_dur;
+ duration = ( buf->stop - buf->start ) * job->arate / 90000 + bias;
m->sum_dur += duration;
}
else