Mercurial > libavcodec.hg
changeset 2574:9973475ccf1e libavcodec
create temporary file in current directory if it failed in /tmp
author | michael |
---|---|
date | Wed, 23 Mar 2005 19:19:59 +0000 |
parents | c0ce123ef11c |
children | 0afef2899701 |
files | xvidff.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/xvidff.c Wed Mar 23 14:10:22 2005 +0000 +++ b/xvidff.c Wed Mar 23 19:19:59 2005 +0000 @@ -234,6 +234,10 @@ } strcpy(x->twopassfile, "/tmp/xvidff.XXXXXX"); fd = mkstemp(x->twopassfile); + if(fd < 0){ + strcpy(x->twopassfile, "./xvidff.XXXXXX"); + fd = mkstemp(x->twopassfile); + } if( fd == -1 ) { av_log(avctx, AV_LOG_ERROR, "XviD: Cannot write 2-pass pipe\n");