summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_lavf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index a153615fc5..50250db877 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -148,6 +148,8 @@ static offset_t mp_seek(URLContext *h, offset_t pos, int whence){
else
return -1;
+ if(pos<0)
+ return -1;
if(pos<stream->end_pos && stream->eof)
stream_reset(stream);
if(stream_seek(stream, pos)==0)