diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 20:36:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-08 20:53:37 +0200 |
commit | 0b99e858d1ab8098b67a86c6fe27782ac2265cbe (patch) | |
tree | 2760c0dffe48b3dd8ae290dadd216c2f7cd519b4 /libavformat | |
parent | 59810f8388ab4e746229b2e0048aa9eb4f36bdd7 (diff) | |
download | ffmpeg-0b99e858d1ab8098b67a86c6fe27782ac2265cbe.tar.gz |
ffmdec: fix seeking for non indexed files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/ffmdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 0747f8dbe0..42c1466e44 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -461,7 +461,7 @@ static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, in av_dlog(s, "wanted_pts=%0.6f\n", wanted_pts / 1000000.0); /* find the position using linear interpolation (better than dichotomy in typical cases) */ - if (ffm->write_index < ffm->file_size) { + if (ffm->write_index && ffm->write_index < ffm->file_size) { if (get_dts(s, FFM_PACKET_SIZE) < wanted_pts) { pos_min = FFM_PACKET_SIZE; pos_max = ffm->write_index - FFM_PACKET_SIZE; |