Browse Source

cache: check lseek() return

Fixes CID717496
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 12 years ago
parent
commit
eb19d89d8e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/cache.c

+ 3
- 1
libavformat/cache.c View File

@@ -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);
}
}


Loading…
Cancel
Save