mpegtsbase: do not remove programs on EOS

As a consequence, tsdemux won't remove its pads anymore on EOS.

Fixes the case when mpegtsbase is not able to process new packets
after EOS as the corresponding pids aren't known anymore because
the programs were removed and the pes/psi were kept, preventing the
PAT to be parsed again.

https://bugzilla.gnome.org/show_bug.cgi?id=738695
This commit is contained in:
Matthieu Bouron 2014-10-24 16:52:42 +02:00 committed by Edward Hervey
parent a5350f2d0c
commit 0b040b7131

View file

@ -1016,15 +1016,6 @@ remove_each_program (gpointer key, MpegTSBaseProgram * program,
return TRUE;
}
static gboolean
gst_mpegts_base_handle_eos (MpegTSBase * base)
{
g_hash_table_foreach_remove (base->programs, (GHRFunc) remove_each_program,
base);
/* finally remove */
return TRUE;
}
static inline GstFlowReturn
mpegts_base_drain (MpegTSBase * base)
{
@ -1075,10 +1066,6 @@ mpegts_base_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
case GST_EVENT_STREAM_START:
gst_event_unref (event);
break;
case GST_EVENT_EOS:
res = GST_MPEGTS_BASE_GET_CLASS (base)->push_event (base, event);
res &= gst_mpegts_base_handle_eos (base);
break;
case GST_EVENT_CAPS:
/* FIXME, do something */
gst_event_unref (event);