diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-06 17:39:28 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-06 17:39:28 +0200 |
commit | 67ddf21611b904de1ee3eb0206cd2744a135704a (patch) | |
tree | e5520357343aa34826b9a656433b1efa72c740c6 /libavcodec | |
parent | 4d8356b6788016d578941d1b43d141d5db2fdf14 (diff) | |
download | ffmpeg-streaming-67ddf21611b904de1ee3eb0206cd2744a135704a.zip ffmpeg-streaming-67ddf21611b904de1ee3eb0206cd2744a135704a.tar.gz |
avcodec/vdpau: do not dereference hwctx before checking it for NULL
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vdpau.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index a760988..1827e1a 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -89,7 +89,6 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, vdctx->width = UINT32_MAX; vdctx->height = UINT32_MAX; - hwctx->reset = 0; if (!hwctx) { vdctx->device = VDP_INVALID_HANDLE; @@ -103,6 +102,7 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, vdctx->device = VDP_INVALID_HANDLE; return 0; /* Decoder created by user */ } + hwctx->reset = 0; vdctx->device = hwctx->device; vdctx->get_proc_address = hwctx->get_proc_address; |