From: Wim T. <wt...@us...> - 2002-06-02 15:34:47
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: wtay Date: Sun Jun 02 2002 08:34:47 PDT Log message: Don't update state if the peer event failed Modified files: gst : gstqueue.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstqueue.c.diff?r1=1.42&r2=1.43 ====Begin Diffs==== Index: gstqueue.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstqueue.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- gstqueue.c 2 Jun 2002 11:51:26 -0000 1.42 +++ gstqueue.c 2 Jun 2002 15:34:34 -0000 1.43 @@ -523,6 +523,7 @@ 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 @@ 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 |