[Ffmpeg-cvslog] CVS: ffmpeg/libavformat utils.c,1.156,1.157
Michael Niedermayer CVS
michael
Fri Jul 8 11:14:08 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv8053
Modified Files:
utils.c
Log Message:
avformat/av_seek_frame_binary with growing file patch by (Kenneth Aafl?y: kenneth, aafloy net)
Index: utils.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/utils.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- utils.c 5 Jul 2005 09:07:51 -0000 1.156
+++ utils.c 8 Jul 2005 09:14:05 -0000 1.157
@@ -1198,7 +1198,7 @@
AVInputFormat *avif= s->iformat;
int64_t pos_min, pos_max, pos, pos_limit;
int64_t ts_min, ts_max, ts;
- int64_t start_pos;
+ int64_t start_pos, filesize;
int index, no_change;
AVStream *st;
@@ -1256,7 +1256,8 @@
if(ts_max == AV_NOPTS_VALUE){
int step= 1024;
- pos_max = url_fsize(&s->pb) - 1;
+ filesize = url_fsize(&s->pb);
+ pos_max = filesize - 1;
do{
pos_max -= step;
ts_max = avif->read_timestamp(s, stream_index, &pos_max, pos_max + step);
@@ -1272,6 +1273,8 @@
break;
ts_max= tmp_ts;
pos_max= tmp_pos;
+ if(tmp_pos >= filesize)
+ break;
}
pos_limit= pos_max;
}
More information about the ffmpeg-cvslog
mailing list