tests: fixed fake soup http src plugin
authorFlorin Apostol <florin.apostol@oregan.net>
Fri, 16 Oct 2015 17:36:20 +0000 (18:36 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Thu, 29 Oct 2015 16:01:40 +0000 (16:01 +0000)
The soup http src changed the way it interprets the seek segment stop value.
Previously it was inclusive, now it is not (see commit
21c6da6764c0cd015e9f3c5eecba36e297187deb,
bug https://bugzilla.gnome.org/show_bug.cgi?id=748316)

Updated fake soup http src to also consider segment stop not inclusive.

https://bugzilla.gnome.org/show_bug.cgi?id=756322

tests/check/elements/fake_http_src.c

index 2a4362c..b45ef48 100644 (file)
@@ -235,14 +235,14 @@ gst_fake_soup_http_src_do_seek (GstBaseSrc * basesrc, GstSegment * segment)
     return FALSE;
   }
 
-  if (segment->stop != -1 && segment->stop + 1 > src->size) {
+  if (segment->stop != -1 && segment->stop > src->size) {
     return FALSE;
   }
 
   src->position = segment->start;
 
   if (segment->stop != -1) {
-    src->segment_end = segment->stop + 1;
+    src->segment_end = segment->stop;
   }
 
   return TRUE;