From f948082e5fc24b00c5b7dbf4493906f1e540a743 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Sun, 10 Feb 2019 19:47:02 +0000 Subject: [PATCH] vaapi_encode_mpeg2: Add missing marker bit in time_code We don't have anything useful to put in this field, but there is still meant to be a marker bit in the middle of it. --- libavcodec/vaapi_encode_mpeg2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c index ef8af664c2..fb1ef71fdc 100644 --- a/libavcodec/vaapi_encode_mpeg2.c +++ b/libavcodec/vaapi_encode_mpeg2.c @@ -313,7 +313,8 @@ static int vaapi_encode_mpeg2_init_sequence_params(AVCodecContext *avctx) goph->group_start_code = MPEG2_START_GROUP; - goph->time_code = 0; + // Marker bit in the middle of time_code. + goph->time_code = 1 << 12; goph->closed_gop = 1; goph->broken_link = 0;