diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-09-09 22:49:14 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-10-17 20:56:30 +0100 |
commit | 94a4048619665e99a19d9e2961254dc9b5c736a7 (patch) | |
tree | f6771a2e608af2a0eb6845f0a8127ba7ba216fcf | |
parent | 0bc7575ced65bf4aa4678ac12d550aaf87890d0e (diff) | |
download | ffmpeg-94a4048619665e99a19d9e2961254dc9b5c736a7.tar.gz |
vaapi_h264: Fix CPB/DPB delays
This should be ticks, not time_scale steps - it was wrong for all
framerates not a multiple of 1/2.
(cherry picked from commit 30645174e333c7db1946ab09be769db9be9d7481)
-rw-r--r-- | libavcodec/vaapi_encode_h264.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c index 201e94a8ce..46950772a9 100644 --- a/libavcodec/vaapi_encode_h264.c +++ b/libavcodec/vaapi_encode_h264.c @@ -616,10 +616,8 @@ static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx, if (opt->sei & SEI_TIMING) { memset(&priv->pic_timing, 0, sizeof(priv->pic_timing)); - priv->pic_timing.cpb_removal_delay = - 2 * sps->vui.num_units_in_tick * priv->cpb_delay; - priv->pic_timing.dpb_output_delay = - 2 * sps->vui.num_units_in_tick * priv->dpb_delay; + priv->pic_timing.cpb_removal_delay = 2 * priv->cpb_delay; + priv->pic_timing.dpb_output_delay = 2 * priv->dpb_delay; priv->sei_needed = 1; } |