avcodec/dxva2: Fix "may be used uninitialized" warnings
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 26 May 2015 02:40:04 +0000 (04:40 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 26 May 2015 02:40:34 +0000 (04:40 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/dxva2.c

index eb8959e..4eb5236 100644 (file)
@@ -59,7 +59,7 @@ int ff_dxva2_commit_buffer(AVCodecContext *avctx,
     void     *dxva_data;
     unsigned dxva_size;
     int      result;
-    HRESULT hr;
+    HRESULT hr = 0;
 
 #if CONFIG_D3D11VA
     if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD)
@@ -136,7 +136,7 @@ int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame,
     D3D11_VIDEO_DECODER_BUFFER_DESC buffer11[4];
 #endif
     DXVA2_DecodeBufferDesc          buffer2[4];
-    DECODER_BUFFER_DESC             *buffer,*buffer_slice;
+    DECODER_BUFFER_DESC             *buffer = NULL, *buffer_slice = NULL;
     int result, runs = 0;
     HRESULT hr;
     unsigned type;