decklinkvideosink: Cast result of bitwise-or of multiple enum values to the enum...
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Nov 2018 08:02:57 +0000 (10:02 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 13 Nov 2018 08:02:57 +0000 (10:02 +0200)
In C++ the bitwise-or results in an int, and ints are not implicitely
cast to enums.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/25#note_78122

sys/decklink/gstdecklinkvideosink.cpp

index 58ceb9c..8eaa54a 100644 (file)
@@ -484,7 +484,7 @@ gst_decklink_video_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
     flags = bmdVideoOutputRP188;
 
   if (self->caption_line > 0)
-    flags |= bmdVideoOutputVANC;
+    flags = (BMDVideoOutputFlags) (flags | bmdVideoOutputVANC);
 
   ret = self->output->output->EnableVideoOutput (mode->mode, flags);
   if (ret != S_OK) {