Imported Upstream version 1.0.5
diff --git a/gst/mpegpsmux/mpegpsmux.h b/gst/mpegpsmux/mpegpsmux.h
index 6d994f4..8e59627 100644
--- a/gst/mpegpsmux/mpegpsmux.h
+++ b/gst/mpegpsmux/mpegpsmux.h
@@ -94,9 +94,16 @@
guint8 stream_id_ext;
PsMuxStream *stream;
- GstBuffer *queued_buf; /* Currently pulled buffer */
- GstClockTime cur_ts; /* Adjusted TS for the pulled buffer */
- GstClockTime last_ts; /* Most recent valid TS for this stream */
+ /* Currently pulled buffer */
+ struct {
+ GstBuffer *buf;
+ GstClockTime ts; /* adjusted TS = MIN (DTS, PTS) for the pulled buffer */
+ GstClockTime pts; /* adjusted PTS (running time) */
+ GstClockTime dts; /* adjusted DTS (running time) */
+ } queued;
+
+ /* Most recent valid TS (DTS or PTS) for this stream */
+ GstClockTime last_ts;
GstBuffer * codec_data; /* Optional codec data available in the caps */
@@ -110,10 +117,10 @@
#define CLOCK_BASE 9LL
#define CLOCK_FREQ (CLOCK_BASE * 10000)
-#define MPEGTIME_TO_GSTTIME(time) (gst_util_uint64_scale ((time), \
- GST_MSECOND/10, CLOCK_BASE))
-#define GSTTIME_TO_MPEGTIME(time) (gst_util_uint64_scale ((time), \
- CLOCK_BASE, GST_MSECOND/10))
+#define GSTTIME_TO_MPEGTIME(time) \
+ (GST_CLOCK_TIME_IS_VALID(time) ? \
+ gst_util_uint64_scale ((time), CLOCK_BASE, GST_MSECOND/10) : \
+ -1)
#define NORMAL_TS_PACKET_LENGTH 188
#define M2TS_PACKET_LENGTH 192