mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
Don't update state if the peer event failed
Original commit message from CVS: Don't update state if the peer event failed
This commit is contained in:
parent
816275f8ad
commit
74f97cd6f8
2 changed files with 32 additions and 22 deletions
|
@ -523,6 +523,7 @@ static gboolean
|
|||
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
||||
{
|
||||
GstQueue *queue;
|
||||
gboolean res = TRUE;
|
||||
|
||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
||||
|
||||
|
@ -534,19 +535,23 @@ gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH:
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||
gst_queue_locked_flush (queue);
|
||||
break;
|
||||
case GST_EVENT_SEEK:
|
||||
gst_queue_locked_flush (queue);
|
||||
default:
|
||||
gst_pad_event_default (pad, event);
|
||||
break;
|
||||
res = gst_pad_event_default (pad, event);
|
||||
if (res) {
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH:
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||
gst_queue_locked_flush (queue);
|
||||
break;
|
||||
case GST_EVENT_SEEK:
|
||||
if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH)
|
||||
gst_queue_locked_flush (queue);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_mutex_unlock (queue->qlock);
|
||||
return TRUE;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -523,6 +523,7 @@ static gboolean
|
|||
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
||||
{
|
||||
GstQueue *queue;
|
||||
gboolean res = TRUE;
|
||||
|
||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
||||
|
||||
|
@ -534,19 +535,23 @@ gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH:
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||
gst_queue_locked_flush (queue);
|
||||
break;
|
||||
case GST_EVENT_SEEK:
|
||||
gst_queue_locked_flush (queue);
|
||||
default:
|
||||
gst_pad_event_default (pad, event);
|
||||
break;
|
||||
res = gst_pad_event_default (pad, event);
|
||||
if (res) {
|
||||
switch (GST_EVENT_TYPE (event)) {
|
||||
case GST_EVENT_FLUSH:
|
||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||
gst_queue_locked_flush (queue);
|
||||
break;
|
||||
case GST_EVENT_SEEK:
|
||||
if (GST_EVENT_SEEK_FLAGS (event) & GST_SEEK_FLAG_FLUSH)
|
||||
gst_queue_locked_flush (queue);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_mutex_unlock (queue->qlock);
|
||||
return TRUE;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Reference in a new issue