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/asfdec_o.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/asfdec_o.c')
-rw-r--r-- | libavformat/asfdec_o.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index 56f8446b5f..f7000b0413 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.c @@ -960,7 +960,7 @@ static int asf_read_data(AVFormatContext *s, const GUIDParseTable *g) size, asf->nb_packets); avio_skip(pb, 2); // skip reserved field asf->first_packet_offset = avio_tell(pb); - if (pb->seekable && !(asf->b_flags & ASF_FLAG_BROADCAST)) + if ((pb->seekable & AVIO_SEEKABLE_NORMAL) && !(asf->b_flags & ASF_FLAG_BROADCAST)) align_position(pb, asf->offset, asf->data_size); return 0; @@ -1738,7 +1738,9 @@ static int asf_read_header(AVFormatContext *s) size = avio_rl64(pb); align_position(pb, asf->offset, size); } - if (asf->data_reached && (!pb->seekable || (asf->b_flags & ASF_FLAG_BROADCAST))) + if (asf->data_reached && + (!(pb->seekable & AVIO_SEEKABLE_NORMAL) || + (asf->b_flags & ASF_FLAG_BROADCAST))) break; } @@ -1747,7 +1749,7 @@ static int asf_read_header(AVFormatContext *s) ret = AVERROR_INVALIDDATA; goto failed; } - if (pb->seekable) + if (pb->seekable & AVIO_SEEKABLE_NORMAL) avio_seek(pb, asf->first_packet_offset, SEEK_SET); for (i = 0; i < asf->nb_streams; i++) { |