summaryrefslogtreecommitdiff
path: root/libavformat/ape.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-02-04 16:29:37 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-02-06 13:09:11 -0500
commit1bc035bc03542c0b2215effc0e53c5c9d2e786ac (patch)
tree362b4ab5857d2b82d60661f6fe455669d601c9f8 /libavformat/ape.c
parent9814974d2e4c7f3f7fda6cd45ab330b20bc88452 (diff)
ape: return error if seeking to the current packet fails in ape_read_packet()
Diffstat (limited to 'libavformat/ape.c')
-rw-r--r--libavformat/ape.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 345648eb33..a6e9bf1d79 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -361,7 +361,8 @@ static int ape_read_packet(AVFormatContext * s, AVPacket * pkt)
if (ape->currentframe > ape->totalframes)
return AVERROR(EIO);
- avio_seek (s->pb, ape->frames[ape->currentframe].pos, SEEK_SET);
+ if (avio_seek(s->pb, ape->frames[ape->currentframe].pos, SEEK_SET) < 0)
+ return AVERROR(EIO);
/* Calculate how many blocks there are in this frame */
if (ape->currentframe == (ape->totalframes - 1))