Opened 8 years ago

Closed 8 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)

failure.png (18.8 KB ) - added by Paul Kapustin 8 years ago.
Error screenshot
callstack.png (27.0 KB ) - added by Paul Kapustin 8 years ago.
Call stack

Download all attachments as: .zip

Change History (3)

by Paul Kapustin, 8 years ago

Attachment: failure.png added

Error screenshot

by Paul Kapustin, 8 years ago

Attachment: callstack.png added

Call stack

comment:1 by Carl Eugen Hoyos, 8 years ago

Analyzed by developer: unset
Keywords: image2 added; international UTF-8 windows pattern images removed
Reproduced by developer: unset
Resolution: duplicate
Status: newclosed

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.

Note: See TracTickets for help on using tickets.