diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 08148e1d73..22136ffcf8 100644 --- a/gst/mpegtsmux/mpegtsmux.c +++ b/gst/mpegtsmux/mpegtsmux.c @@ -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) { diff --git a/gst/mpegtsmux/tsmux/tsmux.c b/gst/mpegtsmux/tsmux/tsmux.c index 6bf315dfec..a51218615a 100644 --- a/gst/mpegtsmux/tsmux/tsmux.c +++ b/gst/mpegtsmux/tsmux/tsmux.c @@ -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 */ diff --git a/gst/mpegtsmux/tsmux/tsmux.h b/gst/mpegtsmux/tsmux/tsmux.h index ab764d6973..464eaccba0 100644 --- a/gst/mpegtsmux/tsmux/tsmux.h +++ b/gst/mpegtsmux/tsmux/tsmux.h @@ -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;