From aa850688f4b913e4cda5a8a457823a040febc5e6 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 28 Apr 2014 08:43:25 -0700 Subject: [PATCH] Don't try to open compressed subtitle tracks Actually supporting them would be even better of course, but at least don't crash on them. --- src/mkv_wrap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mkv_wrap.cpp b/src/mkv_wrap.cpp index 043646440..ae65df1e5 100644 --- a/src/mkv_wrap.cpp +++ b/src/mkv_wrap.cpp @@ -187,7 +187,7 @@ void MatroskaWrapper::GetSubtitles(agi::fs::path const& filename, AssFile *targe // Find tracks for (auto track : boost::irange(0u, tracks)) { auto trackInfo = mkv_GetTrackInfo(file, track); - if (trackInfo->Type != 0x11) continue; + if (trackInfo->Type != 0x11 || trackInfo->CompEnabled) continue; // Known subtitle format std::string CodecID(trackInfo->CodecID); @@ -265,7 +265,7 @@ bool MatroskaWrapper::HasSubtitles(agi::fs::path const& filename) { for (auto track : boost::irange(0u, tracks)) { auto trackInfo = mkv_GetTrackInfo(file, track); - if (trackInfo->Type == 0x11) { + if (trackInfo->Type == 0x11 && !trackInfo->CompEnabled) { std::string CodecID(trackInfo->CodecID); if (CodecID == "S_TEXT/SSA" || CodecID == "S_TEXT/ASS" || CodecID == "S_TEXT/UTF8") return true;