Browse Source

matroskadec: don't try to seek to negative timestamp

matroska timestamps are unsigned

Originally committed as revision 14956 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Aurelien Jacobs 17 years ago
parent
commit
dfbbbdc0bf
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/matroskadec.c

+ 3
- 0
libavformat/matroskadec.c View File

@@ -1642,6 +1642,9 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
AVStream *st = s->streams[stream_index]; AVStream *st = s->streams[stream_index];
int index; int index;


if (timestamp < 0)
timestamp = 0;

index = av_index_search_timestamp(st, timestamp, flags); index = av_index_search_timestamp(st, timestamp, flags);
if (index < 0) if (index < 0)
return 0; return 0;


Loading…
Cancel
Save