diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2005-05-19 00:06:27 +0000 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2005-05-19 00:06:27 +0000 |
commit | a965c478b2b2fe7d9d0a2c60561bb4ee171a2119 (patch) | |
tree | 92bd415fe4020d93d262d7a120ec0b00823cb3b3 /libavformat/utils.c | |
parent | 3b5ffe7a399a8ff8a600a31ba9b4348e5d2e8b86 (diff) | |
download | ffmpeg-a965c478b2b2fe7d9d0a2c60561bb4ee171a2119.tar.gz |
drop most url_fileno() calls (allows to use ByteIOContext directly in caller apps instead of URLProtocol)
Originally committed as revision 4275 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 868ff81c49..9927cfca66 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1192,7 +1192,7 @@ int av_seek_frame_binary(AVFormatContext *s, int stream_index, int64_t target_ts 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 @@ static int av_seek_frame_byte(AVFormatContext *s, int stream_index, int64_t pos, #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_from_pts(AVFormatContext *ic) 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; } |