From 5f963e7213ec8690f99b389d7dbff0689e99c17e Mon Sep 17 00:00:00 2001 From: tobigun Date: Thu, 23 Jul 2009 19:26:19 +0000 Subject: 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 --- unicode/src/media/UVideo.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'unicode/src/media/UVideo.pas') 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 -- cgit v1.2.3