[FFmpeg-devel] [PATCH 4/5] ffmpeg_dxva2: remove unused initial values

Steve Lhomme robux4 at gmail.com
Fri Dec 16 12:12:04 EET 2016


From: Steve Lhomme <robux4 at gmail.com>

---
 ffmpeg_dxva2.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ffmpeg_dxva2.c b/ffmpeg_dxva2.c
index eb61017..cfde649 100644
--- a/ffmpeg_dxva2.c
+++ b/ffmpeg_dxva2.c
@@ -124,8 +124,8 @@ static int dxva2_get_decoder_configuration(AVCodecContext *s, const GUID *device
     InputStream  *ist = s->opaque;
     int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
     DXVA2Context *ctx = ist->hwaccel_ctx;
-    unsigned cfg_count = 0;
-    DXVA2_ConfigPictureDecode *cfg_list = NULL;
+    unsigned cfg_count;
+    DXVA2_ConfigPictureDecode *cfg_list;
     HRESULT hr;
     int ret;
 
@@ -144,7 +144,7 @@ static int dxva2_validate_output(DXVA_DECODER_SERVICE decoder_service, GUID guid
 {
     HRESULT hr;
     int ret = 0;
-    unsigned j, target_count = 0;
+    unsigned j, target_count;
     D3DFORMAT *target_list;
     hr = IDirectXVideoDecoderService_GetDecoderRenderTargets(decoder_service, &guid, &target_count, &target_list);
     if (SUCCEEDED(hr)) {
@@ -166,9 +166,9 @@ static int dxva2_create_decoder(AVCodecContext *s)
     int loglevel = (ist->hwaccel_id == HWACCEL_AUTO) ? AV_LOG_VERBOSE : AV_LOG_ERROR;
     DXVA2Context *ctx = ist->hwaccel_ctx;
     struct dxva_context *dxva_ctx = s->hwaccel_context;
-    GUID *guid_list = NULL;
-    unsigned guid_count = 0;
-    GUID device_guid = GUID_NULL;
+    GUID *guid_list;
+    unsigned guid_count;
+    GUID device_guid;
     const D3DFORMAT surface_format = (s->sw_pix_fmt == AV_PIX_FMT_YUV420P10) ? MKTAG('P','0','1','0') : MKTAG('N','V','1','2');
     D3DFORMAT target_format = 0;
     DXVA2_VideoDesc desc = { 0 };
-- 
2.10.2



More information about the ffmpeg-devel mailing list