mpegtsdemux: fix memleaks and refcounts

Use correct constants for PID_type so that we clear the right filter.
provide_clock must return a ref to a clock.
This commit is contained in:
Wim Taymans 2009-05-21 16:00:46 +02:00
parent 9618c43784
commit 580b20d6cc

View file

@ -382,8 +382,8 @@ gst_mpegts_demux_reset (GstMpegTSDemux * demux)
case PID_TYPE_ELEMENTARY: case PID_TYPE_ELEMENTARY:
gst_pes_filter_uninit (&stream->filter); gst_pes_filter_uninit (&stream->filter);
break; break;
case PID_PROGRAM_ASSOCIATION_TABLE: case PID_TYPE_PROGRAM_ASSOCIATION:
case PID_CONDITIONAL_ACCESS_TABLE: case PID_TYPE_CONDITIONAL_ACCESS:
case PID_TYPE_PROGRAM_MAP: case PID_TYPE_PROGRAM_MAP:
gst_section_filter_uninit (&stream->section_filter); gst_section_filter_uninit (&stream->section_filter);
break; break;
@ -2620,8 +2620,7 @@ gst_mpegts_demux_provide_clock (GstElement * element)
"MpegTSClock", NULL); "MpegTSClock", NULL);
demux->clock_base = GST_CLOCK_TIME_NONE; demux->clock_base = GST_CLOCK_TIME_NONE;
} }
return gst_object_ref (demux->clock);
return demux->clock;
} }
return NULL; return NULL;