[FFmpeg-cvslog] avcodec/vdpau: do not dereference hwctx before checking it for NULL
Michael Niedermayer
git at videolan.org
Mon Oct 6 17:49:00 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 6 17:39:28 2014 +0200| [67ddf21611b904de1ee3eb0206cd2744a135704a] | committer: Michael Niedermayer
avcodec/vdpau: do not dereference hwctx before checking it for NULL
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67ddf21611b904de1ee3eb0206cd2744a135704a
---
libavcodec/vdpau.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
More information about the ffmpeg-cvslog
mailing list