[FFmpeg-trac] #5256(avformat:new): Ffprobe fails to open images with international characters in the file name

FFmpeg trac at avcodec.org
Sun Feb 21 14:29:57 CET 2016


#5256: Ffprobe fails to open images with international characters in the file name
-------------------------------------+-------------------------------------
             Reporter:  badbadboy    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:
             Keywords:               |  unspecified
  international UTF-8 windows        |               Blocked By:
  pattern images                     |  Reproduced by developer:  1
             Blocking:               |
Analyzed by developer:  1            |
-------------------------------------+-------------------------------------
 Ffprobe '''on Windows''' fails to open files with international characters
 in the file name '''when pattern_type is used'''.
 How to reproduce:
 {{{
 % ffprobe pattern_type=sequence "файл%0.jpg"
 }}}

 Tested on git-master and 2.8.2 - 2.8.6 on Windows
 In case sequence pattern is in use, all of the versions fail.

 Cause (libavformat):
 If pattern_type is set, img2dec.c/find_image_range() is called. Further,
 this invokes avio.c/avio_check() followed by file.c/file_check().
 File_check() calls C library function stat(), and the last one fails when
 provided with a const char *path containing international characters in
 UTF-8.

 Possible solution:
 Use utf8towchar() similar to file_open.c/win32_open() to convert the
 string to a wide char string, and use _wstat() instead of stat().

 Attached: error screenshot, call stack.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5256>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list