diff options
author | James Almer | 2017-03-21 17:02:30 -0300 |
---|---|---|
committer | James Almer | 2017-03-21 17:02:30 -0300 |
commit | 4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch) | |
tree | ff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/oggdec.c | |
parent | 423375d4f06ae7103e575a31c23e62e3ba440845 (diff) | |
parent | 83548fe894cdb455cc127f754d09905b6d23c173 (diff) |
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173':
lavf: fix usage of AVIOContext.seekable
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r-- | libavformat/oggdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index edeae2ba83..97ad1a27d1 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -209,7 +209,7 @@ static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, int nsegs) const struct ogg_codec *codec; int i = 0; - if (s->pb->seekable) { + if (s->pb->seekable & AVIO_SEEKABLE_NORMAL) { uint8_t magic[8]; int64_t pos = avio_tell(s->pb); avio_skip(s->pb, nsegs); @@ -355,7 +355,7 @@ static int ogg_read_page(AVFormatContext *s, int *sid) sync[(sp + 2) & 3] == 'g' && sync[(sp + 3) & 3] == 'S') break; - if(!i && bc->seekable && ogg->page_pos > 0) { + if(!i && (bc->seekable & AVIO_SEEKABLE_NORMAL) && ogg->page_pos > 0) { memset(sync, 0, 4); avio_seek(bc, ogg->page_pos+4, SEEK_SET); ogg->page_pos = -1; @@ -613,7 +613,7 @@ static int ogg_get_length(AVFormatContext *s) int64_t size, end; int streams_left=0; - if (!s->pb->seekable) + if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) return 0; // already set |