decklink: Fix compiler warning with clang

gstdecklink.cpp:821:11: warning: variable 'dtc' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
      if (m_input->videosrc) {
          ^~~~~~~~~~~~~~~~~
gstdecklink.cpp:837:41: note: uninitialized use occurs here
          stream_time, stream_duration, dtc, no_signal);
                                        ^~~
gstdecklink.cpp:821:7: note: remove the 'if' if its condition is always true
      if (m_input->videosrc) {
      ^~~~~~~~~~~~~~~~~~~~~~~
gstdecklink.cpp:810:29: note: initialize the variable 'dtc' to silence this warning
      IDeckLinkTimecode *dtc;
                            ^
                             = NULL
This commit is contained in:
Sebastian Dröge 2017-01-25 20:48:58 +02:00
parent bba07f3c35
commit d6b75e5233

View file

@ -807,7 +807,7 @@ public:
if (got_video_frame && videosrc && video_frame) {
BMDTimeValue stream_time = GST_CLOCK_TIME_NONE;
BMDTimeValue stream_duration = GST_CLOCK_TIME_NONE;
IDeckLinkTimecode *dtc;
IDeckLinkTimecode *dtc = NULL;
res =
video_frame->GetStreamTime (&stream_time, &stream_duration,