diff options
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 3959a3665a..cdcfb9c5a0 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -484,7 +484,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, break; case AMF_DATA_TYPE_OBJECT: if (key && - ioc->seekable && + (ioc->seekable & AVIO_SEEKABLE_NORMAL) && !strcmp(KEYFRAMES_TAG, key) && depth == 1) if (parse_keyframes_index(s, ioc, max_pos) < 0) @@ -1040,7 +1040,7 @@ skip: } av_log(s, AV_LOG_TRACE, "%d %X %d \n", stream_type, flags, st->discard); - if (s->pb->seekable && + if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY || stream_type == FLV_STREAM_TYPE_AUDIO)) av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME); @@ -1056,7 +1056,8 @@ skip: // if not streamed and no duration from metadata then seek to end to find // the duration from the timestamps - if (s->pb->seekable && (!s->duration || s->duration == AV_NOPTS_VALUE) && + if ((s->pb->seekable & AVIO_SEEKABLE_NORMAL) && + (!s->duration || s->duration == AV_NOPTS_VALUE) && !flv->searched_for_end) { int size; const int64_t pos = avio_tell(s->pb); |