summaryrefslogtreecommitdiff
path: root/libavformat/wavdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
committerJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
commit4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch)
treeff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/wavdec.c
parent423375d4f06ae7103e575a31c23e62e3ba440845 (diff)
parent83548fe894cdb455cc127f754d09905b6d23c173 (diff)
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/wavdec.c')
-rw-r--r--libavformat/wavdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 0ca1ef42f8..a3cd4ffa06 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -410,7 +410,7 @@ static int wav_read_header(AVFormatContext *s)
got_xma2 = 1;
break;
case MKTAG('d', 'a', 't', 'a'):
- if (!pb->seekable && !got_fmt && !got_xma2) {
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL) && !got_fmt && !got_xma2) {
av_log(s, AV_LOG_ERROR,
"found no 'fmt ' tag before the 'data' tag\n");
return AVERROR_INVALIDDATA;
@@ -433,7 +433,7 @@ static int wav_read_header(AVFormatContext *s)
/* don't look for footer metadata if we can't seek or if we don't
* know where the data tag ends
*/
- if (!pb->seekable || (!rf64 && !size))
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL) || (!rf64 && !size))
goto break_loop;
break;
case MKTAG('f', 'a', 'c', 't'):
@@ -821,7 +821,7 @@ static int w64_read_header(AVFormatContext *s)
wav->data_end = avio_tell(pb) + size - 24;
data_ofs = avio_tell(pb);
- if (!pb->seekable)
+ if (!(pb->seekable & AVIO_SEEKABLE_NORMAL))
break;
avio_skip(pb, size - 24);