Commit 3d78f7fa authored by michael's avatar michael

create temporary file in current directory if it failed in /tmp


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4075 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 60509bdc
......@@ -234,6 +234,10 @@ int ff_xvid_encode_init(AVCodecContext *avctx) {
}
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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment