queue2: Fix merging of ranges
authorWim Taymans <wtaymans@redhat.com>
Tue, 18 Feb 2014 13:21:20 +0000 (14:21 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 18 Feb 2014 13:29:01 +0000 (14:29 +0100)
commit6fa8edd6b0b13006a2633f98b7fb5735e7fc134d
treeb9e825f4a3a0f7ce9f98b670320cff888232ac5c
parent04a6c661c82a29df0627519da678595f48aa8abd
queue2: Fix merging of ranges

Make a method to get the seeking threshold. If data is further away from
this threshold we want to perform a seek upstream.
When the current downloaded range can merge with the next range,
actually include the data of the next range into the current range
instead of discarding it. Also decide if we seek to the write position
of the merged range or continue reading.
plugins/elements/gstqueue2.c