Opened 10 years ago
Closed 10 years ago
#5256 closed defect (duplicate)
Ffprobe fails to open images with international characters in the file name
| Reported by: | Paul Kapustin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | unspecified | Keywords: | image2 |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
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.
Attachments (2)
Change History (3)
by , 10 years ago
| Attachment: | failure.png added |
|---|
comment:1 by , 10 years ago
| Analyzed by developer: | unset |
|---|---|
| Keywords: | image2 added; international UTF-8 windows pattern images removed |
| Reproduced by developer: | unset |
| Resolution: | → duplicate |
| Status: | new → closed |
Duplicate of ticket #819
For future tickets: Please do not report issues for ffprobe (or ffplay) if they are reproducible with ffmpeg and please do not provide screen shots, always paste your command line including complete, uncut console output.



Error screenshot