break;
case GST_EVENT_EOS:
res = gst_mpegts_base_handle_eos (base);
+ gst_event_unref (event);
break;
case GST_EVENT_FLUSH_START:
mpegts_packetizer_flush (base->packetizer);
mpegts_base_flush (base);
res = GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, event);
- gst_event_unref (event);
break;
case GST_EVENT_FLUSH_STOP:
gst_segment_init (&base->segment, GST_FORMAT_UNDEFINED);
/* Passthrough */
default:
res = GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, event);
- gst_event_unref (event);
}
gst_object_unref (base);
mpegts_base_scan (MpegTSBase * base)
{
GstFlowReturn ret;
- GstBuffer *buf;
+ GstBuffer *buf = NULL;
guint i;
gboolean done = FALSE;
MpegTSPacketizerPacketReturn pret;
/* Push to packetizer */
mpegts_packetizer_push (base->packetizer, buf);
+ buf = NULL;
if (mpegts_packetizer_has_packets (base->packetizer)) {
if (base->seek_offset == -1) {
/* Push to packetizer */
mpegts_packetizer_push (base->packetizer, buf);
+ buf = NULL;
if (mpegts_packetizer_has_packets (base->packetizer)) {
while (1) {
break;
case BASE_MODE_STREAMING:
{
- GstBuffer *buf;
+ GstBuffer *buf = NULL;
GST_DEBUG ("Pulling data from %" G_GUINT64_FORMAT, base->seek_offset);
GstTSDemux *demux = (GstTSDemux *) base;
GList *tmp;
- if (G_UNLIKELY (demux->program == NULL))
+ if (G_UNLIKELY (demux->program == NULL)) {
+ gst_event_unref (event);
return FALSE;
+ }
for (tmp = demux->program->stream_list; tmp; tmp = tmp->next) {
TSDemuxStream *stream = (TSDemuxStream *) tmp->data;
}
}
+ gst_event_unref (event);
+
return TRUE;
}
if (name)
g_free (name);
-
+ if (template)
+ gst_object_unref (template);
if (caps)
gst_caps_unref (caps);