From 2434af3d31b544071543684867fdfcf3d254f3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 28 Aug 2014 17:13:05 +0300 Subject: [PATCH] playsinkconvertbin: setcaps() always returns TRUE and the return value is unused Change it to a void return value. The caps are forwarded afterwards via gst_pad_event_default() and not inside this function. CID 1226477 --- gst/playback/gstplaysinkconvertbin.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gst/playback/gstplaysinkconvertbin.c b/gst/playback/gstplaysinkconvertbin.c index cb0b174fdc..04fd4e98e9 100644 --- a/gst/playback/gstplaysinkconvertbin.c +++ b/gst/playback/gstplaysinkconvertbin.c @@ -32,7 +32,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_play_sink_convert_bin_debug); #define parent_class gst_play_sink_convert_bin_parent_class -static gboolean gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * +static void gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * self, GstCaps * caps); G_DEFINE_TYPE (GstPlaySinkConvertBin, gst_play_sink_convert_bin, GST_TYPE_BIN); @@ -250,7 +250,7 @@ gst_play_sink_convert_bin_sink_event (GstPad * pad, GstObject * parent, GstCaps *caps; gst_event_parse_caps (event, &caps); - ret = gst_play_sink_convert_bin_sink_setcaps (self, caps); + gst_play_sink_convert_bin_sink_setcaps (self, caps); break; } default: @@ -283,7 +283,7 @@ unblock_proxypad (GstPlaySinkConvertBin * self) } } -static gboolean +static void gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * self, GstCaps * caps) { @@ -292,7 +292,8 @@ gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * self, gboolean reconfigure = FALSE; gboolean raw; - GST_DEBUG_OBJECT (self, "setcaps"); + GST_DEBUG_OBJECT (self, "Setting sink caps %" GST_PTR_FORMAT, caps); + GST_PLAY_SINK_CONVERT_BIN_LOCK (self); s = gst_caps_get_structure (caps, 0); name = gst_structure_get_name (s); @@ -338,10 +339,6 @@ gst_play_sink_convert_bin_sink_setcaps (GstPlaySinkConvertBin * self, } GST_PLAY_SINK_CONVERT_BIN_UNLOCK (self); - - GST_DEBUG_OBJECT (self, "Setting sink caps %" GST_PTR_FORMAT, caps); - - return TRUE; } #define GST_PLAY_SINK_CONVERT_BIN_FILTER_CAPS(filter,caps) G_STMT_START { \