From 275e60e5a98a43fdbdcc3ef4729d4022c490172b Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Wed, 28 Sep 2016 14:53:42 -0700 Subject: [PATCH] Detect .webvtt as WebVTT files Some subtitle files use .webvtt instead of .vtt, probably because ffmpeg uses -f webvtt when converting from some other format. Change-Id: If88e8d2b90e5dea6751409568d5191e923dec4aa --- packager/media/base/container_names.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packager/media/base/container_names.cc b/packager/media/base/container_names.cc index dbfeac90b6..4650c12f3f 100644 --- a/packager/media/base/container_names.cc +++ b/packager/media/base/container_names.cc @@ -1758,6 +1758,9 @@ MediaContainerName DetermineContainerFromFileName( } else if (base::EndsWith(file_name, ".vtt", base::CompareCase::INSENSITIVE_ASCII)) { return CONTAINER_WEBVTT; + } else if (base::EndsWith(file_name, ".webvtt", + base::CompareCase::INSENSITIVE_ASCII)) { + return CONTAINER_WEBVTT; } else if (base::EndsWith(file_name, ".ttml", base::CompareCase::INSENSITIVE_ASCII)) { return CONTAINER_TTML;