Mercurial > libavformat.hg
diff utils.c @ 764:cdb845a57ae4 libavformat
drop most url_fileno() calls (allows to use ByteIOContext directly in caller apps instead of URLProtocol)
| author | aurel |
|---|---|
| date | Thu, 19 May 2005 00:06:27 +0000 |
| parents | 7177bd7f1f47 |
| children | d3cec742f7c0 |
line wrap: on
line diff
--- a/utils.c Tue May 17 22:47:34 2005 +0000 +++ b/utils.c Thu May 19 00:06:27 2005 +0000 @@ -1192,7 +1192,7 @@ if(ts_max == AV_NOPTS_VALUE){ int step= 1024; - pos_max = url_filesize(url_fileno(&s->pb)) - 1; + pos_max = url_fsize(&s->pb) - 1; do{ pos_max -= step; ts_max = avif->read_timestamp(s, stream_index, &pos_max, pos_max + step); @@ -1289,7 +1289,7 @@ #endif pos_min = s->data_offset; - pos_max = url_filesize(url_fileno(&s->pb)) - 1; + pos_max = url_fsize(&s->pb) - 1; if (pos < pos_min) pos= pos_min; else if(pos > pos_max) pos= pos_max; @@ -1586,15 +1586,13 @@ static void av_estimate_timings(AVFormatContext *ic) { - URLContext *h; int64_t file_size; /* get the file size, if possible */ if (ic->iformat->flags & AVFMT_NOFILE) { file_size = 0; } else { - h = url_fileno(&ic->pb); - file_size = url_filesize(h); + file_size = url_fsize(&ic->pb); if (file_size < 0) file_size = 0; }
