summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2019-01-16 08:49:47 -0800
committerJohn Stebbins <[email protected]>2019-01-18 12:10:18 -0800
commit271ad3952c54f46c0b2d6785a0a2f0830ae5c58e (patch)
treede4989f51872edd8b9222c03b528c759e855c996 /libhb
parent9e6f310208ff7df7345724c87ca8ef84fdaa7270 (diff)
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
Diffstat (limited to 'libhb')
-rw-r--r--libhb/encavcodec.c14
1 files changed, 12 insertions, 2 deletions
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)