From 9e7401bedf4705e546c4612e9398819c6ee4d880 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Thu, 7 Dec 2017 15:23:17 +0100 Subject: [PATCH] decodebin3: Use GST_GROUP_ID_INVALID --- gst/playback/gstdecodebin3-parse.c | 2 +- gst/playback/gstdecodebin3.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gst/playback/gstdecodebin3-parse.c b/gst/playback/gstdecodebin3-parse.c index eeae721f8a..b96eff7b51 100644 --- a/gst/playback/gstdecodebin3-parse.c +++ b/gst/playback/gstdecodebin3-parse.c @@ -208,7 +208,7 @@ parse_chain_output_probe (GstPad * pad, GstPadProbeInfo * info, case GST_EVENT_STREAM_START: { GstStream *stream = NULL; - guint group_id = G_MAXUINT32; + guint group_id = GST_GROUP_ID_INVALID; if (!gst_event_parse_group_id (ev, &group_id)) { GST_FIXME_OBJECT (pad, diff --git a/gst/playback/gstdecodebin3.c b/gst/playback/gstdecodebin3.c index 8d6ea536c4..c8218b7714 100644 --- a/gst/playback/gstdecodebin3.c +++ b/gst/playback/gstdecodebin3.c @@ -200,7 +200,7 @@ struct _GstDecodebin3 GList *other_inputs; /* counter for input */ guint32 input_counter; - /* Current stream group_id (default : G_MAXUINT32) */ + /* Current stream group_id (default : GST_GROUP_ID_INVALID) */ /* FIXME : Needs to be resetted appropriately (when upstream changes ?) */ guint32 current_group_id; /* End of variables protected by input_lock */ @@ -606,7 +606,7 @@ gst_decodebin3_init (GstDecodebin3 * dbin) "max-size-buffers", 0, "use-interleave", TRUE, NULL); gst_bin_add ((GstBin *) dbin, dbin->multiqueue); - dbin->current_group_id = G_MAXUINT32; + dbin->current_group_id = GST_GROUP_ID_INVALID; g_mutex_init (&dbin->factories_lock); g_mutex_init (&dbin->selection_lock); @@ -711,7 +711,7 @@ set_input_group_id (DecodebinInput * input, guint32 * group_id) GstDecodebin3 *dbin = input->dbin; if (input->group_id != *group_id) { - if (input->group_id != G_MAXUINT32) + if (input->group_id != GST_GROUP_ID_INVALID) GST_WARNING_OBJECT (dbin, "Group id changed (%" G_GUINT32_FORMAT " -> %" G_GUINT32_FORMAT ") on input %p ", input->group_id, *group_id, input); @@ -719,7 +719,7 @@ set_input_group_id (DecodebinInput * input, guint32 * group_id) } if (*group_id != dbin->current_group_id) { - if (dbin->current_group_id == G_MAXUINT32) { + if (dbin->current_group_id == GST_GROUP_ID_INVALID) { GST_DEBUG_OBJECT (dbin, "Setting current group id to %" G_GUINT32_FORMAT, *group_id); dbin->current_group_id = *group_id; @@ -955,7 +955,7 @@ create_new_input (GstDecodebin3 * dbin, gboolean main) input = g_new0 (DecodebinInput, 1); input->dbin = dbin; input->is_main = main; - input->group_id = G_MAXUINT32; + input->group_id = GST_GROUP_ID_INVALID; if (main) input->ghost_sink = gst_ghost_pad_new_no_target ("sink", GST_PAD_SINK); else { @@ -2765,6 +2765,7 @@ gst_decodebin3_change_state (GstElement * element, GstStateChange transition) } g_list_free (dbin->slots); dbin->slots = NULL; + dbin->current_group_id = GST_GROUP_ID_INVALID; /* Free inputs */ } break;