Opened 6 months ago
Closed 6 months ago
#10981 closed defect (invalid)
avformat_open_input cant handle unicode filename after update to ffmpeg-6 and c++20
Reported by: | DarylE | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | 6.1.1 | Keywords: | unicode |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Our c++ application (xlights.org) is now failing with unable to open mp3 files when given a filename with unicode characters.
eg. Everybody Want (From “The Hunger Games_ Catching Fire” Soundtrack).mp3
this is our call.
int res = avformat_open_input(&formatContext, _audio_file.c_str(), nullptr, nullptr)
Is there anything we could or should have done to handle this now in this version of avformat?
(windows 64bit, along with Unix and MacOS)
Change History (4)
comment:1 by , 6 months ago
Summary: | avformat_open_input cant handle unicode filename after update to ffmpeg-6 → avformat_open_input cant handle unicode filename after update to ffmpeg-6 and c++20 |
---|
comment:2 by , 6 months ago
comment:3 by , 6 months ago
This is the definition ..
std::string _audio_file;
Our fix was to go thru the code with ToUTF8(). Weird how this would have changed..
int res = avformat_open_input(&formatContext, ToUTF8(_audio_file).c_str(), nullptr, nullptr);
comment:4 by , 6 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Maybe this changed the behaviour: 92885f26817b6b2515ac9fd5410c9e8be64bd0c0
In any case, you should pass UTF8 filenames to avformat_open_input, so closing this.
Are you passing the filename as UTF-8?