summaryrefslogtreecommitdiffstats
path: root/sys/osxaudio/gstosxaudiosrc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/osxaudio/gstosxaudiosrc.c')
-rw-r--r--sys/osxaudio/gstosxaudiosrc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/osxaudio/gstosxaudiosrc.c b/sys/osxaudio/gstosxaudiosrc.c
index 94877ef5..6d0331ca 100644
--- a/sys/osxaudio/gstosxaudiosrc.c
+++ b/sys/osxaudio/gstosxaudiosrc.c
@@ -159,11 +159,13 @@ gst_osxaudiosrc_get (GstPad * pad)
if (readbytes < 0) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
+ gst_object_unref (src);
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}
if (readbytes == 0) {
gst_buffer_unref (buf);
+ gst_object_unref (src);
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}
@@ -174,6 +176,8 @@ gst_osxaudiosrc_get (GstPad * pad)
GST_DEBUG ("pushed buffer from soundcard of %ld bytes", readbytes);
+ gst_object_unref (src);
+
return GST_DATA (buf);
}