From 8978fedaeefdff50ed4deefbfe822ad07f19f616 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 5 Mar 2011 21:06:46 +0100 Subject: avio: introduce an AVIOContext.seekable field Use it instead of url_is_streamed and AVIOContext.is_streamed. --- libavformat/flvdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavformat/flvdec.c') diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 972b4d95dd..ef26b05b3b 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -437,7 +437,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) } // if not streamed and no duration from metadata then seek to end to find the duration from the timestamps - if(!url_is_streamed(s->pb) && (!s->duration || s->duration==AV_NOPTS_VALUE)){ + if(s->pb->seekable && (!s->duration || s->duration==AV_NOPTS_VALUE)){ int size; const int64_t pos= avio_tell(s->pb); const int64_t fsize= avio_size(s->pb); @@ -539,7 +539,7 @@ static int flv_read_seek2(AVFormatContext *s, int stream_index, if (ts - min_ts > (uint64_t)(max_ts - ts)) flags |= AVSEEK_FLAG_BACKWARD; - if (url_is_streamed(s->pb)) { + if (!s->pb->seekable) { if (stream_index < 0) { stream_index = av_find_default_stream_index(s); if (stream_index < 0) -- cgit v1.2.3