Advertisement
Guest User

Untitled

a guest
May 29th, 2012
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.79 KB | None | 0 0
  1. diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
  2. index 3b695a9..893ce3f 100644
  3. --- a/libavformat/avisynth.c
  4. +++ b/libavformat/avisynth.c
  5. @@ -49,10 +49,15 @@ static int avisynth_read_header(AVFormatContext *s)
  6.    DWORD id;
  7.    AVStream *st;
  8.    AVISynthStream *stream;
  9. +  wchar_t filename_wchar[1024] = { 0 };
  10. +  char filename_char[1024] = { 0 };
  11.  
  12.    AVIFileInit();
  13.  
  14. -  res = AVIFileOpen(&avs->file, s->filename, OF_READ|OF_SHARE_DENY_WRITE, NULL);
  15. +  MultiByteToWideChar(CP_UTF8, 0, s->filename, -1, filename_wchar, 1024);
  16. +  WideCharToMultiByte(CP_OEMCP, 0, filename_wchar, -1, filename_char, 1024, NULL, NULL);
  17. +
  18. +  res = AVIFileOpen(&avs->file, filename_char, OF_READ|OF_SHARE_DENY_WRITE, NULL);
  19.    if (res != S_OK)
  20.      {
  21.        av_log(s, AV_LOG_ERROR, "AVIFileOpen failed with error %ld", res);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement