diff options
author | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-03-21 17:02:30 -0300 |
commit | 4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch) | |
tree | ff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/flvdec.c | |
parent | 423375d4f06ae7103e575a31c23e62e3ba440845 (diff) | |
parent | 83548fe894cdb455cc127f754d09905b6d23c173 (diff) | |
download | ffmpeg-4de591e6fb7361bd417dcd9563672ed0ad8b361b.tar.gz |
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
lavf: fix usage of AVIOContext.seekable
Merged-by: James Almer <jamrial@gmail.com>
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); |