diff options
author | John Stebbins <[email protected]> | 2017-02-14 16:36:07 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-14 16:36:07 -0700 |
commit | e3181b6e131fa52b96b076ea7c752b509028e9d6 (patch) | |
tree | 6ea377ccc111fe3ca0f832e07ffa02392a458949 /libhb/muxavformat.c | |
parent | 5429a92c51682240acbbe7b150d314d993d7d3a0 (diff) |
mux: revert shift timestamps by largest encoder delay
Ugh! I need a brain transplant! This would have cause a properly
functioning player to insert silence at the start of playback that
wasn't in the original source.
reverts 5429a92c51682240acbbe7b150d314d993d7d3a0
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r-- | libhb/muxavformat.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index 5f15b7970..729e6c672 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -44,7 +44,6 @@ struct hb_mux_object_s AVFormatContext * oc; AVRational time_base; - int64_t delay; int ntracks; hb_mux_data_t ** tracks; @@ -108,25 +107,6 @@ static char* lookup_lang_code(int mux, char *iso639_2) return out; } -static int64_t compute_delay(hb_job_t * job) -{ - int64_t delay = 0; - - if (job->config.init_delay > delay) - delay = job->config.init_delay; - - int ii, count; - count = hb_list_count(job->list_audio); - for (ii = 0; ii < count; ii++) - { - hb_audio_t * audio = hb_list_item(job->list_audio, ii); - if (audio->priv.config.init_delay > delay) - delay = audio->priv.config.init_delay; - } - - return delay; -} - /********************************************************************** * avformatInit ********************************************************************** @@ -150,8 +130,6 @@ static int avformatInit( hb_mux_object_t * m ) uint8_t need_fonts = 0; char *lang; - m->delay = AV_NOPTS_VALUE; - max_tracks = 1 + hb_list_count( job->list_audio ) + hb_list_count( job->list_subtitle ); @@ -1085,10 +1063,6 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu hb_job_t * job = m->job; uint8_t * sub_out = NULL; - if (m->delay == AV_NOPTS_VALUE) - { - m->delay = compute_delay(m->job); - } if (track->type == MUX_TYPE_VIDEO && (job->mux & HB_MUX_MASK_MP4)) { // compute dts duration for MP4 files @@ -1123,15 +1097,6 @@ static int avformatMux(hb_mux_object_t *m, hb_mux_data_t *track, hb_buffer_t *bu return 0; } - buf->s.start += m->delay; - if (buf->s.renderOffset != AV_NOPTS_VALUE) - { - buf->s.renderOffset += m->delay; - } - if (buf->s.stop != AV_NOPTS_VALUE) - { - buf->s.stop += m->delay; - } if (track->type == MUX_TYPE_VIDEO && (job->mux & HB_MUX_MASK_MKV) && buf->s.renderOffset < 0) { |