[vlc-commits] stream: reset peek buffer and offset when seeking to title/seekpoint

Rémi Denis-Courmont git at videolan.org
Wed Sep 2 21:54:15 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep  2 22:48:30 2015 +0300| [15ec73bd6b5c8dbfa14f035870bec91ea17da50b] | committer: Rémi Denis-Courmont

stream: reset peek buffer and offset when seeking to title/seekpoint

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

 src/input/stream.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/input/stream.c b/src/input/stream.c
index 244143c..fbfe63f 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -523,6 +523,23 @@ int stream_vaControl(stream_t *s, int cmd, va_list args)
 
     switch (cmd)
     {
+        case STREAM_SET_TITLE:
+        case STREAM_SET_SEEKPOINT:
+        {
+            int ret = s->pf_control(s, cmd, args);
+            if (ret != VLC_SUCCESS)
+                return ret;
+
+            priv->offset = 0;
+
+            if (priv->peek != NULL)
+            {
+                block_Release(priv->peek);
+                priv->peek = NULL;
+            }
+            return VLC_SUCCESS;
+        }
+
         case STREAM_GET_PRIVATE_BLOCK:
         {
             block_t **b = va_arg(args, block_t **);



More information about the vlc-commits mailing list