aboutsummaryrefslogtreecommitdiffstats
path: root/unicode/src/media/UVideo.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 19:26:19 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2009-07-23 19:26:19 +0000
commit5f963e7213ec8690f99b389d7dbff0689e99c17e (patch)
treecb0e4d3a39a7c2a29a53f2918584e3354afad743 /unicode/src/media/UVideo.pas
parent1365033c29121a284458b28b7d6b154a2e0641c8 (diff)
downloadusdx-5f963e7213ec8690f99b389d7dbff0689e99c17e.tar.gz
usdx-5f963e7213ec8690f99b389d7dbff0689e99c17e.tar.xz
usdx-5f963e7213ec8690f99b389d7dbff0689e99c17e.zip
UTF8 file protocol ('ufile:') added for FFmpeg unicode support
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/branches/experimental@1889 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--unicode/src/media/UVideo.pas5
1 files changed, 3 insertions, 2 deletions
diff --git a/unicode/src/media/UVideo.pas b/unicode/src/media/UVideo.pas
index de01fd68..8d441e6c 100644
--- a/unicode/src/media/UVideo.pas
+++ b/unicode/src/media/UVideo.pas
@@ -262,7 +262,8 @@ begin
Reset();
- errnum := av_open_input_file(fFormatContext, PChar(FileName.ToNative), nil, 0, nil);
+ // use custom 'ufile' protocol for UTF-8 support
+ errnum := av_open_input_file(fFormatContext, PAnsiChar('ufile:'+FileName.ToUTF8), nil, 0, nil);
if (errnum <> 0) then
begin
Log.LogError('Failed to open file "'+ FileName.ToNative +'" ('+FFmpegCore.GetErrorString(errnum)+')');
@@ -435,7 +436,7 @@ begin
fAVFrame := nil;
fAVFrameRGB := nil;
fFrameBuffer := nil;
-
+
if (fCodecContext <> nil) then
begin
// avcodec_close() is not thread-safe