summaryrefslogtreecommitdiff
path: root/libavformat/flvdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-03-05 21:06:46 +0100
committerAnton Khirnov <anton@khirnov.net>2011-04-03 22:46:40 +0200
commit8978fedaeefdff50ed4deefbfe822ad07f19f616 (patch)
treeffa8b7680649f418f83b1e833e0221749fbb6bdd /libavformat/flvdec.c
parent79997def65fd2313b48a5f3c3a884c6149ae9b5d (diff)
avio: introduce an AVIOContext.seekable field
Use it instead of url_is_streamed and AVIOContext.is_streamed.
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r--libavformat/flvdec.c4
1 files changed, 2 insertions, 2 deletions
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)