summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-12 02:25:58 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-12 02:25:58 +0200
commit2856332719d8ec182523f7793bb0517aaac68e73 (patch)
tree036b1da7ee3668855971b8997148b8599963f299
parent5449239a031e657cfe364521d2b6d58c0ef0e7f0 (diff)
downloadffmpeg-streaming-2856332719d8ec182523f7793bb0517aaac68e73.zip
ffmpeg-streaming-2856332719d8ec182523f7793bb0517aaac68e73.tar.gz
avcodec/vda_h264: fix null pointer dereference
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vda_h264.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 2bb45c3..4caed5e 100644
--- a/libavcodec/vda_h264.c
+++ b/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;
}
OpenPOWER on IntegriCloud