[vlc-commits] stream: add assertions
Rémi Denis-Courmont
git at videolan.org
Thu Sep 3 20:50:48 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 3 21:50:21 2015 +0300| [25027d3a58fbcda4e962b6033524b0037165cebe] | committer: Rémi Denis-Courmont
stream: add assertions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=25027d3a58fbcda4e962b6033524b0037165cebe
---
src/input/stream.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/input/stream.c b/src/input/stream.c
index 5d8da22..15a4079 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -474,6 +474,7 @@ int stream_Seek(stream_t *s, uint64_t offset)
block_Release(peek);
}
+ assert(stream_Tell(s) == offset);
return VLC_SUCCESS;
}
}
@@ -481,7 +482,10 @@ int stream_Seek(stream_t *s, uint64_t offset)
else
{
if (priv->offset == offset)
+ {
+ assert(stream_Tell(s) == offset);
return VLC_SUCCESS; /* Nothing to do! */
+ }
}
if (s->pf_seek == NULL)
@@ -499,7 +503,8 @@ int stream_Seek(stream_t *s, uint64_t offset)
block_Release(peek);
}
- return ret;
+ assert(stream_Tell(s) == offset);
+ return VLC_SUCCESS;
}
static int stream_ControlInternal(stream_t *s, int cmd, ...)
More information about the vlc-commits
mailing list