mpegtsmux: take all the pmt in the streamheaders

This commit is contained in:
Marc-André Lureau 2010-06-08 13:59:08 +02:00 committed by Zaheer Abbas Merali
parent 233b09f9b9
commit d335a55b49
3 changed files with 7 additions and 5 deletions

View file

@ -927,7 +927,9 @@ new_packet_cb (guint8 * data, guint len, void *user_data, gint64 new_pcr)
if (!mux->streamheader_sent) {
guint pid = ((data[1] & 0x1f) << 8) | data[2];
if (pid == 0x00 || pid == 0x02) { /* if it's a PAT or a PMT */
/* if it's a PAT or a PMT */
if (pid == 0x00 ||
(pid >= TSMUX_START_PMT_PID && pid < TSMUX_START_ES_PID)) {
mux->streamheader =
g_list_append (mux->streamheader, gst_buffer_copy (buf));
} else if (mux->streamheader) {

View file

@ -98,10 +98,6 @@
#define TSMUX_DEFAULT_NETWORK_ID 0x0001
#define TSMUX_DEFAULT_TS_ID 0x0001
#define TSMUX_START_PROGRAM_ID 0x0001
#define TSMUX_START_PMT_PID 0x0010
#define TSMUX_START_ES_PID 0x0040
/* HACK: We use a fixed buffering offset for the PCR at the moment -
* this is the amount 'in advance' of the stream that the PCR sits.
* 1/8 second atm */

View file

@ -92,6 +92,10 @@ G_BEGIN_DECLS
#define TSMUX_PID_AUTO ((guint16)-1)
#define TSMUX_START_PROGRAM_ID 0x0001
#define TSMUX_START_PMT_PID 0x0010
#define TSMUX_START_ES_PID 0x0040
typedef struct TsMuxSection TsMuxSection;
typedef struct TsMux TsMux;