[FFmpeg-devel] Recent regression in VA-API compatibility (assertion in H.264 encode)

Mark Thompson sw at jkqxz.net
Fri Dec 1 22:15:33 EET 2017


On 01/12/17 18:47, Devin Heitmueller wrote:
> 
>>> Try this?  (Not tested, hardware which can run a version that old isn't immediately to hand.)
>>>
>>> --- a/libavcodec/vaapi_encode_h264.c
>>> +++ b/libavcodec/vaapi_encode_h264.c
>>> @@ -261,7 +261,8 @@ static int vaapi_encode_h264_write_extra_header(AVCodecContext *avctx,
>>>        return 0;
>>>
>>> #if !CONFIG_VAAPI_1
>>> -    } else if (priv->sei_cbr_workaround_needed) {
>>> +    } else if (priv->sei_cbr_workaround_needed &&
>>> +               ctx->va_packed_headers & VA_ENC_PACKED_HEADER_SLICE) {
>>>        // Insert a zero-length header using the old SEI type.  This is
>>>        // required to avoid triggering broken behaviour on Intel platforms
>>>        // in CBR mode where an invalid SEI message is generated by the
>>>
>>
>> Ok, will give this a try tonight and report back on my findings.
> 
> FYI:  this doesn’t appear to have had any effect - I still get the same assert message.

Urgh, right.  It's the SEI it doesn't like rather than the workaround.

"-sei 0" will make it work, I think?  Something further would likely need a specific test for old versions of the Intel driver.

- Mark


More information about the ffmpeg-devel mailing list