From ca864ce46e6e9ae0d105f10909802bccfa5a394f Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 11 Jun 2015 23:01:48 +1000 Subject: [PATCH] playbin: Fix some warnings with clang around multiview enums There is the GstVideoMultiviewMode enum and the GstVideoMultiviewFramePacking, which is a subset of the multiview modes, with the same values as the corresponding types from the full enum. Do some casts and use the right times to avoid implicitly using/passing GstVideoMultiviewFramePacking when a GstVideoMultiviewMode is needed. --- gst/playback/gstplaybin2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index d49ccfeb4c..5a823ce548 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -3078,7 +3078,7 @@ notify: static GstCaps * update_video_multiview_caps (GstPlayBin * playbin, GstCaps * caps) { - GstVideoMultiviewFramePacking mv_mode; + GstVideoMultiviewMode mv_mode; GstVideoMultiviewMode cur_mv_mode; GstVideoMultiviewFlags mv_flags, cur_mv_flags; GstStructure *s; @@ -3086,14 +3086,14 @@ update_video_multiview_caps (GstPlayBin * playbin, GstCaps * caps) GstCaps *out_caps; GST_OBJECT_LOCK (playbin); - mv_mode = playbin->multiview_mode; + mv_mode = (GstVideoMultiviewMode) playbin->multiview_mode; mv_flags = playbin->multiview_flags; GST_OBJECT_UNLOCK (playbin); - if (mv_mode == GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE) + if (mv_mode == GST_VIDEO_MULTIVIEW_MODE_NONE) return NULL; - cur_mv_mode = GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE; + cur_mv_mode = GST_VIDEO_MULTIVIEW_MODE_NONE; cur_mv_flags = GST_VIDEO_MULTIVIEW_FLAGS_NONE; s = gst_caps_get_structure (caps, 0);