summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-06-05 11:49:17 +0300
committerSebastian Dröge <sebastian@centricular.com>2020-06-05 11:49:17 +0300
commite527eb3e4c9f949f5f43537550a50cd295f2d999 (patch)
tree0624e9556c5aeecd4bb93991fd90b3897428dbec
parent7b390a8bbd0da33199e3c083f13bf5cd1a825a96 (diff)
rtpbin: Initialize uninitialized variable correctly
`last_out` would be used uninitialized if the element has no `set-active` signal. Initialize it to -1 as that's what the "default" value is further below. CID 1455443 Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/727 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/613>
-rw-r--r--gst/rtpmanager/gstrtpbin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c
index 6a88b49a69..6fe786d60c 100644
--- a/gst/rtpmanager/gstrtpbin.c
+++ b/gst/rtpmanager/gstrtpbin.c
@@ -3219,7 +3219,7 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message)
streams = g_slist_next (streams)) {
GstRtpBinStream *stream = (GstRtpBinStream *) streams->data;
GstElement *element = stream->buffer;
- guint64 last_out;
+ guint64 last_out = -1;
if (g_signal_lookup ("set-active", G_OBJECT_TYPE (element)) != 0) {
g_signal_emit_by_name (element, "set-active", active, offset,