Skip to content
Snippets Groups Projects
Commit 0704c44d authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/cache: remove ftruncate usage, its not always available


In case of errors the cache file will be slightly larger than needed,
this should have no practical relevance though

Should fix build on VS201*

Found-by: jamrial
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent afaa4a89
No related branches found
No related tags found
No related merge requests found
...@@ -145,8 +145,8 @@ static int add_entry(URLContext *h, const unsigned char *buf, int size) ...@@ -145,8 +145,8 @@ static int add_entry(URLContext *h, const unsigned char *buf, int size)
return 0; return 0;
fail: fail:
if (pos >= 0) //we could truncate the file to pos here if pos >=0 but ftruncate isnt available in VS so
ftruncate(c->fd, pos); //for simplicty we just leave the file a bit larger
av_free(entry); av_free(entry);
av_free(node); av_free(node);
return ret; return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment