summaryrefslogtreecommitdiff
path: root/gst/mpegtsdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-08-21 14:44:38 +0200
committerEdward Hervey <edward@collabora.com>2013-08-21 14:44:38 +0200
commitfd4fd13dc89bb7c17270d89ab83c5406ff162ca9 (patch)
treed23a84c039f22cb9dba4b769629084c5ee941302 /gst/mpegtsdemux
parente4a0c4d5092639e01fa8c9db4f8225b27c1d5c2e (diff)
downloadgstreamer-plugins-bad-fd4fd13dc89bb7c17270d89ab83c5406ff162ca9.tar.gz
tsdemux: Refuse negative rates which we don't support yet
And remove a check which was done before
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r--gst/mpegtsdemux/tsdemux.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 5f94af766..0553ed98b 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -505,14 +505,15 @@ gst_ts_demux_do_seek (MpegTSBase * base, GstEvent * event)
gst_event_parse_seek (event, &rate, &format, &flags, &start_type, &start,
&stop_type, &stop);
- if (format != GST_FORMAT_TIME) {
- goto done;
- }
-
GST_DEBUG ("seek event, rate: %f start: %" GST_TIME_FORMAT
" stop: %" GST_TIME_FORMAT, rate, GST_TIME_ARGS (start),
GST_TIME_ARGS (stop));
+ if (rate <= 0.0) {
+ GST_WARNING ("Negative rate not supported");
+ goto done;
+ }
+
if (flags & (GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_SKIP)) {
GST_WARNING ("seek flags 0x%x are not supported", (int) flags);
goto done;