GST_DEBUG (0, "eos");
vorbisfile->eos = TRUE;
if (avail == 0) {
+ gst_event_unref (event);
return 0;
}
break;
default:
break;
}
+ gst_event_unref (event);
if (avail > 0)
got_bytes = gst_bytestream_peek_bytes (vorbisfile->bs, &data, avail);
else
GST_DEBUG (0, "eos");
//ov_clear (&vorbisfile->vf);
vorbisfile->restart = TRUE;
+ gst_buffer_unref (outbuf);
gst_pad_push (vorbisfile->srcpad, GST_BUFFER (gst_event_new (GST_EVENT_EOS)));
gst_element_set_eos (element);
return;
vorbisfile->total_bytes += GST_BUFFER_SIZE (outbuf);
}
- gst_pad_push (vorbisfile->srcpad, outbuf);
+ if (GST_PAD_IS_CONNECTED (vorbisfile->srcpad)) {
+ gst_pad_push (vorbisfile->srcpad, outbuf);
+ }
+ else {
+ gst_buffer_unref (outbuf);
+ }
}
}
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_SEEK:
- if (!vorbisfile->vf.seekable)
+ if (!vorbisfile->vf.seekable) {
+ gst_event_unref (event);
return FALSE;
+ }
switch (GST_EVENT_SEEK_FORMAT (event)) {
case GST_FORMAT_TIME:
res = FALSE;
break;
}
+
+ gst_event_unref (event);
return res;
}