[FFmpeg-devel] file protocol with Unicode support

Nicolas George nicolas.george at normalesup.org
Thu Apr 14 11:58:51 CEST 2011

Le quintidi 25 germinal, an CCXIX, Kirill Gavrilov a écrit :
> They did it many years ago ;).

"640K ought to be enough for anybody."

> ffmpeg - convert wide-char arguments list to UTF-8 on Windows.

Is it really necessary? I do not like to see these ifdefs outside of

> +char **get_arguments(int* argc)

Should be static.

> +    argv = (char** )av_malloc(sizeof(char*) * (*argc) + aBuffSize);

malloc failure not tested.

> +    if(!(oflag & O_CREAT) &&
> +        _stat(filenameUtf8, &stat_buffer) == 0) {
> +        return open(filenameUtf8, oflag, pmode);

General principle: if you intend to open a file, you do not test its
existence: you directly open it, and if it fails you know it was not there.

>  #include <fcntl.h>

According to Single Unix, open depends on fcntl.h.


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110414/bfda3dbe/attachment.asc>

More information about the ffmpeg-devel mailing list