summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorRobin Stocker <robin@nibor.org>2008-12-29 17:30:03 +0000
committerWim Taymans <wim.taymans@gmail.com>2008-12-29 17:30:03 +0000
commit951306959dd4e6a5f1d2d6046e941340abffee88 (patch)
treeade40c6d30e65519748e02d9ff20651b1718619f /gst
parentf1814feb719a2835d39a256f166623fa4d719298 (diff)
downloadgst-plugins-bad-951306959dd4e6a5f1d2d6046e941340abffee88.tar.gz
gst-plugins-bad-951306959dd4e6a5f1d2d6046e941340abffee88.tar.bz2
gst-plugins-bad-951306959dd4e6a5f1d2d6046e941340abffee88.zip
gst/mpegdemux/gstmpegdemux.c: Converting from time to bytes operates on the stream_time, not the SCR timeline.
Original commit message from CVS: Patch by: Robin Stocker <robin at nibor dot org> * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_src_query): Converting from time to bytes operates on the stream_time, not the SCR timeline. The position reporting should happen in stream_time, not the segment timestamp range. See #557161.
Diffstat (limited to 'gst')
-rw-r--r--gst/mpegdemux/gstmpegdemux.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index e4f13839..2b7f923f 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -55,7 +55,7 @@
/* We clamp scr delta with 0 so negative bytes won't be possible */
#define GSTTIME_TO_BYTES(time) \
- ((time != -1) ? gst_util_uint64_scale (MAX(0,(gint64) (GSTTIME_TO_MPEGTIME(time) - demux->first_scr)), demux->scr_rate_n, demux->scr_rate_d) : -1)
+ ((time != -1) ? gst_util_uint64_scale (MAX(0,(gint64) (GSTTIME_TO_MPEGTIME(time))), demux->scr_rate_n, demux->scr_rate_d) : -1)
#define BYTES_TO_GSTTIME(bytes) ((bytes != -1) ? MPEGTIME_TO_GSTTIME(gst_util_uint64_scale (bytes, demux->scr_rate_d, demux->scr_rate_n)) : -1)
#define ADAPTER_OFFSET_FLUSH(_bytes_) demux->adapter_offset += (_bytes_)
@@ -895,8 +895,7 @@ gst_flups_demux_src_query (GstPad * pad, GstQuery * query)
goto not_supported;
}
- position = demux->base_time +
- MPEGTIME_TO_GSTTIME (demux->current_scr - demux->first_scr);
+ position = MPEGTIME_TO_GSTTIME (demux->current_scr - demux->first_scr);
GST_LOG_OBJECT (demux, "Position at GStreamer Time:%" GST_TIME_FORMAT,
GST_TIME_ARGS (position));