diff options
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/vorbisfile.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/audio/vorbisfile.cc b/src/audio/vorbisfile.cc index 74df9b0..96fbe82 100644 --- a/src/audio/vorbisfile.cc +++ b/src/audio/vorbisfile.cc @@ -42,7 +42,10 @@ PCM *Vorbis::load(std::string const & filename) filesystem::close(fs_file); OggVorbis_File vorbis_file; - if (ov_fopen(vorbis_path.c_str(), &vorbis_file) < 0 ) { + // workaround for Ubuntu 10: ov_fopen parameter 1 is char * instead of const char * + char tmpstr[vorbis_path.size()+1]; + ::strncpy((char *)tmpstr, vorbis_path.c_str(), vorbis_path.size()); + if (ov_fopen(tmpstr, &vorbis_file) < 0 ) { return 0; } |