From d40a999a1c1841577d24555ab3de3e90afe51654 Mon Sep 17 00:00:00 2001 From: Tomas Härdin Date: Tue, 23 Mar 2010 17:22:25 +0000 Subject: Fix seeking in DV when filesize is unknown. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Tomas Härdin, tomas D hardin A codemill D se Originally committed as revision 22645 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/dv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/dv.c') 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; -- cgit v1.2.3