diff options
author | Marc-André Lureau <mlureau@flumotion.com> | 2010-06-08 13:59:08 +0200 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2010-06-08 15:36:29 +0200 |
commit | d335a55b495d2d45fb985cc3a1f06aaeb4ebbaa0 (patch) | |
tree | 9f5fde4fd1f8058120210c3057d99ad9e0472ce9 | |
parent | 233b09f9b9e9044809dea8dbd300dc7e9bb4d881 (diff) |
mpegtsmux: take all the pmt in the streamheaders
-rw-r--r-- | gst/mpegtsmux/mpegtsmux.c | 4 | ||||
-rw-r--r-- | gst/mpegtsmux/tsmux/tsmux.c | 4 | ||||
-rw-r--r-- | gst/mpegtsmux/tsmux/tsmux.h | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c index 08148e1d7..22136ffcf 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 6bf315dfe..a51218615 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 ab764d697..464eaccba 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; |