diff options
author | John Stebbins <[email protected]> | 2017-02-14 16:25:40 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-14 16:27:26 -0700 |
commit | 5429a92c51682240acbbe7b150d314d993d7d3a0 (patch) | |
tree | 51b2b4ef27d3c3a97e76cf43c6a4b15c55ffac45 /libhb/encx264.c | |
parent | df5601053a8857ad8e2b59d56e82bac7f44e96fb (diff) |
mux: shift timestamps by largest encoder delay
This prevents libav from adding an mp4 edit list entry that causes a
properly functioning player to drop the first couple of audio frames.
Diffstat (limited to 'libhb/encx264.c')
-rw-r--r-- | libhb/encx264.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c index 1fccd7d27..1d2fd997e 100644 --- a/libhb/encx264.c +++ b/libhb/encx264.c @@ -654,9 +654,9 @@ static hb_buffer_t *nal_encode( hb_work_object_t *w, x264_picture_t *pic_out, buf->s.start = pic_out->i_pts; buf->s.stop = buf->s.start + buf->s.duration; buf->s.renderOffset = pic_out->i_dts; - if ( !w->config->h264.init_delay && pic_out->i_dts < 0 ) + if ( !w->config->init_delay && pic_out->i_dts < 0 ) { - w->config->h264.init_delay = -pic_out->i_dts; + w->config->init_delay = -pic_out->i_dts; } /* Determine what type of frame we have. */ |