examples: d3d11: Fix GCC build error/warning
authorSeungha Yang <seungha@centricular.com>
Thu, 3 Nov 2022 14:40:00 +0000 (23:40 +0900)
committerSeungha Yang <seungha@centricular.com>
Thu, 3 Nov 2022 17:17:22 +0000 (02:17 +0900)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3318>

subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11decoder-appsink.cpp
subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11videosink-present.cpp

index e671753..25f182f 100644 (file)
@@ -186,7 +186,7 @@ create_video_processor (AppData * data)
   ComPtr < ID3D11VideoContext1 > video_context;
   ComPtr < ID3D11VideoProcessorEnumerator > proc_enum;
   ComPtr < ID3D11VideoProcessor > processor;
-  D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc = { 0, };
+  D3D11_VIDEO_PROCESSOR_CONTENT_DESC desc;
   HRESULT hr;
 
   hr = data->device->QueryInterface (IID_PPV_ARGS (&video_device));
index 714ff4a..c8098a9 100644 (file)
@@ -476,12 +476,6 @@ on_present (GstElement * sink, GstD3D11Device * device,
       &text_brush);
   g_assert (SUCCEEDED (hr));
 
-  D2D1_RECT_F rect;
-  rect.top = 0;
-  rect.bottom = 0;
-  rect.right = desc.Width;
-  rect.bottom = desc.Height / 5.0f;
-
   d2d_target->BeginDraw ();
   /* Draw text */
   d2d_target->DrawTextLayout (D2D1::Point2F (0, 0),
@@ -512,7 +506,6 @@ framerate_calculate_probe (GstPad * pad, GstPadProbeInfo * info,
     std::swap (context->render_timestamp, empty_queue);
   }
 
-out:
   ReleaseSRWLockExclusive (&context->lock);
 
   return GST_PAD_PROBE_OK;