Commit 8d858674 authored by Nablet Developer's avatar Nablet Developer Committed by Michael Niedermayer

avcodec/qsvenc_h264: fix segfault when a53 SEI is not available

Signed-off-by: 's avatarNablet Developer <sdk@nablet.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent a6bce3ca
......@@ -53,7 +53,7 @@ static int qsv_h264_set_encode_ctrl(AVCodecContext *avctx,
int res;
res = ff_alloc_a53_sei(frame, sizeof(mfxPayload) + 2, (void**)&payload, &sei_size);
if (res < 0)
if (res < 0 || !payload)
return res;
sei_data = (mfxU8*)(payload + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment