[vlc-commits] stream: fix stream_Tell() after seek

Rémi Denis-Courmont git at videolan.org
Tue Sep 1 08:32:29 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Sep  1 09:31:14 2015 +0300| [9a2dc82f764ca9b7a0096cfac08f769790c838b3] | committer: Rémi Denis-Courmont

stream: fix stream_Tell() after seek

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

 src/input/stream.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index 90b26a8..d3f10be 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -475,12 +475,16 @@ int stream_vaControl(stream_t *s, int cmd, va_list args)
             uint64_t pos = va_arg(args, uint64_t);
 
             int ret = stream_ControlInternal(s, STREAM_SET_POSITION, pos);
-            if (ret == VLC_SUCCESS && priv->peek != NULL)
+            if (ret != VLC_SUCCESS)
+                return ret;
+
+            if (priv->peek != NULL)
             {
                 block_Release(priv->peek);
                 priv->peek = NULL;
             }
-            return ret;
+            priv->offset = pos;
+            return VLC_SUCCESS;
         }
 
         case STREAM_GET_PRIVATE_BLOCK:



More information about the vlc-commits mailing list