+ fd = utf8_open( psz_tmp, O_RDWR | O_CREAT | O_LARGEFILE |
+ (append ? 0 : O_TRUNC), 0666 );
+ free( psz_tmp );
+ }
+
+ if (fd == -1)
+ {
+ msg_Err( p_access, "cannot open `%s' (%m)", p_access->psz_path );
+ return VLC_EGENERIC;
+ }
+
+ p_access->pf_write = Write;
+ p_access->pf_read = Read;
+ p_access->pf_seek = Seek;
+ p_access->p_sys = (void *)(intptr_t)fd;
+
+ msg_Dbg( p_access, "file access output opened (%s)", p_access->psz_path );
+ if (append)
+ lseek (fd, 0, SEEK_END);
+
+ /* Update pace control flag */
+ if( p_access->psz_access && !strcmp( p_access->psz_access, "stream" ) )
+ p_access->p_sout->i_out_pace_nocontrol++;