movies: properly detect extension of pz/gz audio/video files

This commit is contained in:
rdb 2019-04-28 21:49:23 +02:00
parent be247e1be9
commit 186d8feef4
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,12 @@ PT(MovieAudio) MovieTypeRegistry::
make_audio(const Filename &name) {
string ext = downcase(name.get_extension());
#ifdef HAVE_ZLIB
if (ext == "pz" || ext == "gz") {
ext = Filename(name.get_basename_wo_extension()).get_extension();
}
#endif
_audio_lock.lock();
// Make sure that the list of audio types has been read in.
@ -154,6 +160,12 @@ PT(MovieVideo) MovieTypeRegistry::
make_video(const Filename &name) {
string ext = downcase(name.get_extension());
#ifdef HAVE_ZLIB
if (ext == "pz" || ext == "gz") {
ext = Filename(name.get_basename_wo_extension()).get_extension();
}
#endif
_video_lock.lock();
// Make sure that the list of video types has been read in.