movies: properly detect extension of pz/gz audio/video files
This commit is contained in:
parent
be247e1be9
commit
186d8feef4
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue