diff options
author | Dave Robillard <dave@drobilla.net> | 2009-05-26 19:10:44 -0400 |
---|---|---|
committer | Dave Robillard <dave@drobilla.net> | 2009-05-26 19:10:44 -0400 |
commit | b75a26657febaf86c4137b4d41c068926325e316 (patch) | |
tree | 65c161824169ac09bf8418244937aec6ab77a270 /gst/mpegdemux/mpegtspacketizer.c | |
parent | 4e1d3bba9c21cb8bbfe70ffed953a8385fb7314d (diff) | |
parent | 8f70498c898a65d0938e3e104e91662ff5b693c3 (diff) | |
download | gst-plugins-bad-b75a26657febaf86c4137b4d41c068926325e316.tar.gz gst-plugins-bad-b75a26657febaf86c4137b4d41c068926325e316.tar.bz2 gst-plugins-bad-b75a26657febaf86c4137b4d41c068926325e316.zip |
Merge branch 'master' of git://anongit.freedesktop.org/gstreamer/gst-plugins-bad into fdo
Diffstat (limited to 'gst/mpegdemux/mpegtspacketizer.c')
-rw-r--r-- | gst/mpegdemux/mpegtspacketizer.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gst/mpegdemux/mpegtspacketizer.c b/gst/mpegdemux/mpegtspacketizer.c index 1abbf1fe..b986fa60 100644 --- a/gst/mpegdemux/mpegtspacketizer.c +++ b/gst/mpegdemux/mpegtspacketizer.c @@ -241,7 +241,8 @@ mpegts_packetizer_parse_section_header (MpegTSPacketizer * packetizer, data = GST_BUFFER_DATA (section->buffer); section->table_id = *data++; - if ((data[0] & 0x80) == 0) + /* if table_id is 0 (pat) then ignore the subtable extension */ + if ((data[0] & 0x80) == 0 || section->table_id == 0) section->subtable_extension = 0; else section->subtable_extension = GST_READ_UINT16_BE (data + 2); @@ -1844,6 +1845,22 @@ mpegts_packetizer_clear (MpegTSPacketizer * packetizer) gst_adapter_clear (packetizer->adapter); } +void +mpegts_packetizer_remove_stream (MpegTSPacketizer * packetizer, gint16 pid) +{ + MpegTSPacketizerStream *stream = + (MpegTSPacketizerStream *) g_hash_table_lookup (packetizer->streams, + GINT_TO_POINTER ((gint) pid)); + if (stream) { + GST_INFO ("Removing stream for PID %d", pid); + + g_hash_table_remove (packetizer->streams, GINT_TO_POINTER ((gint) pid)); + + g_object_unref (stream->section_adapter); + g_free (stream); + } +} + MpegTSPacketizer * mpegts_packetizer_new () { |