[FFmpeg-devel] file protocol with Unicode support

Kirill Gavrilov gavr.mail at gmail.com
Thu Apr 14 14:46:31 CEST 2011


2011/4/14 Nicolas George <nicolas.george at normalesup.org>

> 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
> os_support.
>
You will not be allowed to use Unicode file names otherwise on Windows.
Only names in current system code page.
But maybe in such way (in attach) we can avoid some ifdefs...

> +char **get_arguments(int* argc)
> Should be static.
>
It declared in the header cmdutils.h as other functions...

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.
>
Oh yes, that simpler. And I move this below thus UTF-8 have higher priority.

2011/4/14 Nicolas George <nicolas.george at normalesup.org>

> 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
> os_support.
>
> > +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.
>
> Regards,
>
> --
>   Nicolas George
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iEYEARECAAYFAk2mxVsACgkQsGPZlzblTJMrfACdHHKwDB/FJ8wAu9ichcHNlovq
> i/8An1iYZwHmO9F8bMAYbpy7Osunh+qj
> =/3Ug
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
-----------------------------------------------
Kirill Gavrilov,
Software designer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileU4.patch
Type: text/x-patch
Size: 6466 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110414/8b04c65e/attachment.bin>


More information about the ffmpeg-devel mailing list