summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-18 00:55:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-18 00:55:03 +0200
commiteb19d89d8eb51f20299d59558d69d0f057583e7c (patch)
tree4677e4c7eaf2bbe27e3421685c33f4bf7f025198 /libavformat
parentce739e66f4f9154d74f4a84436238abb205152b9 (diff)
cache: check lseek() return
Fixes CID717496 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/cache.c b/libavformat/cache.c
index 2cfc396f29..35f81e83c1 100644
--- a/libavformat/cache.c
+++ b/libavformat/cache.c
@@ -114,7 +114,9 @@ static int64_t cache_seek(URLContext *h, int64_t pos, int whence)
c->pos= pos;
return pos;
}else{
- lseek(c->fd, c->pos, SEEK_SET);
+ if(lseek(c->fd, c->pos, SEEK_SET) < 0) {
+ av_log(h, AV_LOG_ERROR, "Failure to seek in cache\n");
+ }
return AVERROR(EPIPE);
}
}