avcodec/vda_h264: fix null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/68/head
Michael Niedermayer 11 years ago
parent 5449239a03
commit 2856332719
  1. 8
      libavcodec/vda_h264.c

@ -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;
}

Loading…
Cancel
Save