mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-25 23:46:45 +00:00
gst/playback/gststreamselector.c: 3rd time's the charm. Correct ref-counting for discarded buffers.
Original commit message from CVS: * gst/playback/gststreamselector.c: (gst_stream_selector_chain): 3rd time's the charm. Correct ref-counting for discarded buffers.
This commit is contained in:
parent
35905dcfb6
commit
1874a9fc84
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-29 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
|
* gst/playback/gststreamselector.c: (gst_stream_selector_chain):
|
||||||
|
3rd time's the charm. Correct ref-counting for discarded buffers.
|
||||||
|
|
||||||
2005-11-29 Jan Schmidt <thaytan@mad.scientist.com>
|
2005-11-29 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/playback/gststreamselector.c:
|
* gst/playback/gststreamselector.c:
|
||||||
|
|
|
@ -326,12 +326,19 @@ gst_stream_selector_chain (GstPad * pad, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstStreamSelector *sel = GST_STREAM_SELECTOR (gst_pad_get_parent (pad));
|
GstStreamSelector *sel = GST_STREAM_SELECTOR (gst_pad_get_parent (pad));
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
|
GstPad *active_sinkpad;
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (sel);
|
||||||
|
active_sinkpad = sel->active_sinkpad;
|
||||||
|
GST_OBJECT_UNLOCK (sel);
|
||||||
|
|
||||||
/* Ignore buffers from pads except the selected one */
|
/* Ignore buffers from pads except the selected one */
|
||||||
if (pad != sel->active_sinkpad) {
|
if (pad != active_sinkpad) {
|
||||||
GST_DEBUG_OBJECT (sel, "Ignoring buffer %p from pad %s:%s",
|
GST_DEBUG_OBJECT (sel, "Ignoring buffer %p from pad %s:%s",
|
||||||
buf, GST_DEBUG_PAD_NAME (pad));
|
buf, GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
gst_object_unref (sel);
|
gst_object_unref (sel);
|
||||||
|
gst_buffer_unref (buf);
|
||||||
return GST_FLOW_NOT_LINKED;
|
return GST_FLOW_NOT_LINKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue