aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Härdin <Tomas.hardin@codemill.se>2010-03-23 17:22:25 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2010-03-23 17:22:25 +0000
commitd40a999a1c1841577d24555ab3de3e90afe51654 (patch)
tree6050cff5acb10add7044a66fc09580e40c06d90f
parent7a033e08eace53d78ceb13d6b909bcb0d4b2a84e (diff)
downloadffmpeg-d40a999a1c1841577d24555ab3de3e90afe51654.tar.gz
Fix seeking in DV when filesize is unknown.
Patch by Tomas Härdin, tomas D hardin A codemill D se Originally committed as revision 22645 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/dv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 085e8d2d06..af8bb921cb 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -375,7 +375,7 @@ static int64_t dv_frame_offset(AVFormatContext *s, DVDemuxContext *c,
offset = sys->frame_size * timestamp;
- if (offset > max_offset) offset = max_offset;
+ if (size >= 0 && offset > max_offset) offset = max_offset;
else if (offset < 0) offset = 0;
return offset;