[vlc-commits] hls: Fixing backward seek

Chris Smowton git at videolan.org
Sun Mar 4 22:19:16 CET 2012


vlc | branch: master | Chris Smowton <chris at smowton.net> | Sun Mar  4 22:15:06 2012 +0100| [0307c51edc4a04f9ef28c1806941483fd280578a] | committer: Hugo Beauzée-Luyssen

hls: Fixing backward seek

Fixes #6261
Signed-off-by: Hugo Beauzée-Luyssen <beauze.h at gmail.com>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0307c51edc4a04f9ef28c1806941483fd280578a
---

 modules/stream_filter/httplive.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 224e312..0bfed93 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -2392,14 +2392,12 @@ static int segment_Seek(stream_t *s, const uint64_t pos)
         vlc_mutex_lock(&p_sys->download.lock_wait);
         p_sys->download.seek = p_sys->playback.segment;
         vlc_cond_signal(&p_sys->download.wait);
-        vlc_mutex_unlock(&p_sys->download.lock_wait);
 
         /* Wait for download to be finished */
-        vlc_mutex_lock(&p_sys->download.lock_wait);
         msg_Info(s, "seek to segment %d", p_sys->playback.segment);
-        while (((p_sys->download.seek != -1) ||
-                (p_sys->download.segment - p_sys->playback.segment < 3)) &&
-                (p_sys->download.segment < (count - 6)))
+        while ((p_sys->download.seek != -1) ||
+	       ((p_sys->download.segment - p_sys->playback.segment < 3) &&
+                (p_sys->download.segment < count)))
         {
             vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait);
             if (!vlc_object_alive(s) || s->b_error) break;



More information about the vlc-commits mailing list