diff --git a/libavformat/cache.c b/libavformat/cache.c index f6787ee6cf..02b02bbf54 100644 --- a/libavformat/cache.c +++ b/libavformat/cache.c @@ -145,8 +145,8 @@ static int add_entry(URLContext *h, const unsigned char *buf, int size) return 0; fail: - if (pos >= 0) - ftruncate(c->fd, pos); + //we could truncate the file to pos here if pos >=0 but ftruncate isnt available in VS so + //for simplicty we just leave the file a bit larger av_free(entry); av_free(node); return ret;