From: John Stebbins Date: Wed, 16 Jan 2019 16:49:47 +0000 (-0800) Subject: encavcodec: Fix dts timestamps in VT h.265 encoding X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=271ad3952c54f46c0b2d6785a0a2f0830ae5c58e;p=handbrake encavcodec: Fix dts timestamps in VT h.265 encoding The VT h.265 encoder appears to enable b-pyramid, but doesn't expose any method to modify the setting or query for its value. So we'll just assume it's always on whenever there are b-frames. Fixes https://github.com/HandBrake/HandBrake/issues/1689 --- diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index c53d73994..5e5c0f900 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -653,9 +653,19 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) pv->context = context; job->areBframes = 0; - if ( context->has_b_frames ) + if (context->has_b_frames > 0) { - job->areBframes = 1; + if (job->vcodec == HB_VCODEC_FFMPEG_VT_H265) + { + // VT appears to enable b-pyramid by default and there + // is no documented way of modifying this behaviour or + // querying if it is enabled. + job->areBframes = 2; + } + else + { + job->areBframes = context->has_b_frames; + } } if (context->extradata != NULL)