diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-18 00:55:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-18 00:55:03 +0200 |
commit | eb19d89d8eb51f20299d59558d69d0f057583e7c (patch) | |
tree | 4677e4c7eaf2bbe27e3421685c33f4bf7f025198 /libavformat/cache.c | |
parent | ce739e66f4f9154d74f4a84436238abb205152b9 (diff) | |
download | ffmpeg-eb19d89d8eb51f20299d59558d69d0f057583e7c.tar.gz |
cache: check lseek() return
Fixes CID717496
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/cache.c')
-rw-r--r-- | libavformat/cache.c | 4 |
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); } } |