summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--gst/mpegdemux/gstmpegdemux.c20
2 files changed, 22 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 43cbaa06..28aeec30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-20 Edward Hervey <edward.hervey@collabora.co.uk>
+
+ * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data):
+ Fix reverse playback regression.
+ Fixes #557080
+
2008-10-19 Tim-Philipp Müller <tim.muller at collabora co uk>
* ext/apexsink/gstapexplugin.c: (plugin_init):
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index 2b8168ae..e4f13839 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -453,21 +453,33 @@ gst_flups_demux_send_data (GstFluPSDemux * demux, GstFluPSStream * stream,
gint64 time, start, stop;
GstEvent *newsegment;
+ GST_DEBUG ("timestamp:%" GST_TIME_FORMAT " base_time %" GST_TIME_FORMAT
+ " src_segment.start:%" GST_TIME_FORMAT " .stop:%" GST_TIME_FORMAT,
+ GST_TIME_ARGS (timestamp), GST_TIME_ARGS (demux->base_time),
+ GST_TIME_ARGS (demux->src_segment.start),
+ GST_TIME_ARGS (demux->src_segment.stop));
+
if (GST_CLOCK_TIME_IS_VALID (demux->base_time) &&
GST_CLOCK_TIME_IS_VALID (demux->src_segment.start))
start = demux->base_time + demux->src_segment.start;
else
start = 0;
- if (timestamp != GST_CLOCK_TIME_NONE &&
- GST_CLOCK_DIFF (start, timestamp) > GST_SECOND)
- start = timestamp;
-
if (GST_CLOCK_TIME_IS_VALID (demux->src_segment.stop) &&
GST_CLOCK_TIME_IS_VALID (demux->base_time))
stop = demux->base_time + demux->src_segment.stop;
else
stop = -1;
+
+ if (timestamp != GST_CLOCK_TIME_NONE) {
+ if (demux->src_segment.rate > 0) {
+ if (GST_CLOCK_DIFF (start, timestamp) > GST_SECOND)
+ start = timestamp;
+ } else {
+ if (GST_CLOCK_DIFF (stop, timestamp) > GST_SECOND)
+ stop = timestamp;
+ }
+ }
time = start;
#ifdef HAVE_NEWSEG_FULL