From 8b61f5475787e4eaabd9be4a95554089c3ae1ec4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 17 May 2005 14:11:32 +0000 Subject: [PATCH] gst/: Clear queue when going to READY. Original commit message from CVS: * gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_set_caps), (gst_pad_alloc_buffer), (gst_pad_query), (gst_pad_push): * gst/gstqueue.c: (gst_queue_change_state): Clear queue when going to READY. Remove IN_SETCAPS flag too. --- ChangeLog | 8 ++++++++ gst/gstpad.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e2883ee8bd..14c9818b90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-05-17 Wim Taymans + + * gst/gstpad.c: (gst_pad_accept_caps), (gst_pad_set_caps), + (gst_pad_alloc_buffer), (gst_pad_query), (gst_pad_push): + * gst/gstqueue.c: (gst_queue_change_state): + Clear queue when going to READY. + Remove IN_SETCAPS flag too. + 2005-05-17 Tim-Philipp Müller * gst/base/gstbasesrc.c: (gst_basesrc_change_state): diff --git a/gst/gstpad.c b/gst/gstpad.c index 3aa9ef4610..5f68e80f3a 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -1893,6 +1893,7 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps) if (!setcaps (pad, caps)) goto could_not_set; GST_LOCK (pad); + GST_FLAG_UNSET (pad, GST_PAD_IN_SETCAPS); } else { GST_CAT_DEBUG (GST_CAT_CAPS, "pad %s:%s was dispatching", GST_DEBUG_PAD_NAME (pad)); @@ -2263,6 +2264,7 @@ do_caps: caps_changed = caps && caps != GST_RPAD_CAPS (pad); /* we got a new datatype on the pad, see if it can handle it */ if (G_UNLIKELY (caps_changed)) { + GST_DEBUG ("caps changed to %" GST_PTR_FORMAT, caps); if (G_UNLIKELY (!gst_pad_configure_src (GST_PAD_CAST (pad), caps))) goto not_negotiated; } @@ -2872,9 +2874,9 @@ gst_pad_push (GstPad * pad, GstBuffer * buffer) /* FIXME, move capnego this into a base class? */ caps = GST_BUFFER_CAPS (buffer); caps_changed = caps && caps != GST_RPAD_CAPS (peer); - GST_DEBUG ("caps changed %d %" GST_PTR_FORMAT, caps_changed, caps); /* we got a new datatype on the peer pad, see if it can handle it */ if (G_UNLIKELY (caps_changed)) { + GST_DEBUG ("caps changed to %" GST_PTR_FORMAT, caps); if (G_UNLIKELY (!gst_pad_configure_sink (GST_PAD_CAST (peer), caps))) goto not_negotiated; }