summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2008-10-20 14:19:17 +0000
committerEdward Hervey <bilboed@bilboed.com>2008-10-20 14:19:17 +0000
commita794d8cccf554a3010419719473ad3948b85ee1a (patch)
tree1661c4542d87c8569478f607a68d561304ad99f1
parent2c4fc7cd4a89e2f202083a111deaf9ef69042ce0 (diff)
downloadgst-plugins-bad-a794d8cccf554a3010419719473ad3948b85ee1a.tar.gz
gst-plugins-bad-a794d8cccf554a3010419719473ad3948b85ee1a.tar.bz2
gst-plugins-bad-a794d8cccf554a3010419719473ad3948b85ee1a.zip
gst/mpegdemux/gstmpegdemux.c: Fix reverse playback regression.
Original commit message from CVS: * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data): Fix reverse playback regression. Fixes #557080
-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