Commit 28563327 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vda_h264: fix null pointer dereference

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5449239a
......@@ -274,9 +274,11 @@ int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
static int vda_h264_uninit(AVCodecContext *avctx)
{
VDAContext *vda = avctx->internal->hwaccel_priv_data;
av_freep(&vda->bitstream);
if (vda->frame)
CVPixelBufferRelease(vda->frame);
if (vda) {
av_freep(&vda->bitstream);
if (vda->frame)
CVPixelBufferRelease(vda->frame);
}
return 0;
}
......
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