summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2008-12-29 17:55:18 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-12-29 17:55:18 +0000
commit32a2faa55099fb0da4f582a49b8f31a85e315995 (patch)
treeca82ae342a4debb462233efb55f1a24871895bf2
parent951306959dd4e6a5f1d2d6046e941340abffee88 (diff)
downloadgst-plugins-bad-32a2faa55099fb0da4f582a49b8f31a85e315995.tar.gz
gst-plugins-bad-32a2faa55099fb0da4f582a49b8f31a85e315995.tar.bz2
gst-plugins-bad-32a2faa55099fb0da4f582a49b8f31a85e315995.zip
gst/mpegdemux/gstmpegdemux.*: The position member in the newsegment event corresponds to the stream_time of the segme...
Original commit message from CVS: * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data): * gst/mpegdemux/gstmpegdemux.h: The position member in the newsegment event corresponds to the stream_time of the segment start position.
-rw-r--r--ChangeLog7
-rw-r--r--gst/mpegdemux/gstmpegdemux.c5
-rw-r--r--gst/mpegdemux/gstmpegdemux.h6
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a5525ea..12ab728c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk>
+ * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data):
+ * gst/mpegdemux/gstmpegdemux.h:
+ The position member in the newsegment event corresponds to the
+ stream_time of the segment start position.
+
+2008-12-29 Wim Taymans <wim.taymans@collabora.co.uk>
+
Patch by: Robin Stocker <robin at nibor dot org>
* gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_src_query):
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 2b7f923f..6dca661c 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -480,7 +480,10 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream,
stop = timestamp;
}
}
- time = start;
+ if (GST_CLOCK_TIME_IS_VALID (demux->base_time) && start > demux->base_time)
+ time = start - demux->base_time;
+ else
+ time = 0;
#ifdef HAVE_NEWSEG_FULL
GST_INFO_OBJECT (demux, "sending new segment: rate %g applied_rate %g "
diff --git a/gst/mpegdemux/gstmpegdemux.h b/gst/mpegdemux/gstmpegdemux.h
index 3730bac4..1ca2ec74 100644
--- a/gst/mpegdemux/gstmpegdemux.h
+++ b/gst/mpegdemux/gstmpegdemux.h
@@ -102,9 +102,9 @@ struct _GstFluPSDemux {
GstPESFilter filter;
gint64 mux_rate;
- guint64 first_scr;
- guint64 first_dts;
- guint64 base_time;
+ guint64 first_scr;
+ guint64 first_dts;
+ guint64 base_time;
guint64 current_scr;
guint64 next_scr;
guint64 bytes_since_scr;