wavparse: remove extra variable to improve readability

Makes it easier to see that the event is being replaced/unrefed
This commit is contained in:
Thiago Santos 2015-12-01 00:30:08 -03:00
parent d55458135a
commit 5e00c012d2

View file

@ -1085,7 +1085,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
gboolean gotdata = FALSE; gboolean gotdata = FALSE;
GstCaps *caps = NULL; GstCaps *caps = NULL;
gchar *codec_name = NULL; gchar *codec_name = NULL;
GstEvent **event_p;
gint64 upstream_size = 0; gint64 upstream_size = 0;
GstStructure *s; GstStructure *s;
@ -1679,8 +1678,7 @@ gst_wavparse_stream_headers (GstWavParse * wav)
* the right newsegment event downstream. */ * the right newsegment event downstream. */
gst_wavparse_perform_seek (wav, wav->seek_event); gst_wavparse_perform_seek (wav, wav->seek_event);
/* remove pending event */ /* remove pending event */
event_p = &wav->seek_event; gst_event_replace (&wav->seek_event, NULL);
gst_event_replace (event_p, NULL);
/* we just started, we are discont */ /* we just started, we are discont */
wav->discont = TRUE; wav->discont = TRUE;
@ -1818,7 +1816,6 @@ gst_wavparse_send_event (GstElement * element, GstEvent * event)
{ {
GstWavParse *wav = GST_WAVPARSE (element); GstWavParse *wav = GST_WAVPARSE (element);
gboolean res = FALSE; gboolean res = FALSE;
GstEvent **event_p;
GST_DEBUG_OBJECT (wav, "received event %s", GST_EVENT_TYPE_NAME (event)); GST_DEBUG_OBJECT (wav, "received event %s", GST_EVENT_TYPE_NAME (event));
@ -1830,8 +1827,7 @@ gst_wavparse_send_event (GstElement * element, GstEvent * event)
} else { } else {
GST_DEBUG_OBJECT (wav, "queuing seek for later"); GST_DEBUG_OBJECT (wav, "queuing seek for later");
event_p = &wav->seek_event; gst_event_replace (&wav->seek_event, event);
gst_event_replace (event_p, event);
/* we always return true */ /* we always return true */
res = TRUE; res = TRUE;