Commit 25027d3a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

stream: add assertions

parent 9d635a91
...@@ -474,6 +474,7 @@ int stream_Seek(stream_t *s, uint64_t offset) ...@@ -474,6 +474,7 @@ int stream_Seek(stream_t *s, uint64_t offset)
block_Release(peek); block_Release(peek);
} }
assert(stream_Tell(s) == offset);
return VLC_SUCCESS; return VLC_SUCCESS;
} }
} }
...@@ -481,7 +482,10 @@ int stream_Seek(stream_t *s, uint64_t offset) ...@@ -481,7 +482,10 @@ int stream_Seek(stream_t *s, uint64_t offset)
else else
{ {
if (priv->offset == offset) if (priv->offset == offset)
{
assert(stream_Tell(s) == offset);
return VLC_SUCCESS; /* Nothing to do! */ return VLC_SUCCESS; /* Nothing to do! */
}
} }
if (s->pf_seek == NULL) if (s->pf_seek == NULL)
...@@ -499,7 +503,8 @@ int stream_Seek(stream_t *s, uint64_t offset) ...@@ -499,7 +503,8 @@ int stream_Seek(stream_t *s, uint64_t offset)
block_Release(peek); block_Release(peek);
} }
return ret; assert(stream_Tell(s) == offset);
return VLC_SUCCESS;
} }
static int stream_ControlInternal(stream_t *s, int cmd, ...) static int stream_ControlInternal(stream_t *s, int cmd, ...)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment