From bd1328500c9268515f554e50174f1ea273d754e8 Mon Sep 17 00:00:00 2001 From: Kongqun Yang Date: Thu, 26 May 2016 11:55:44 -0700 Subject: [PATCH] Allow uuid to be a valid top level box Change-Id: Iec241781321a30fa8eece6a7fc6674d78a02c90f --- packager/media/base/container_names.cc | 3 ++- packager/media/formats/mp4/box_reader.cc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packager/media/base/container_names.cc b/packager/media/base/container_names.cc index 3d32ed3384..1e57c8a69e 100644 --- a/packager/media/base/container_names.cc +++ b/packager/media/base/container_names.cc @@ -963,6 +963,7 @@ static bool CheckMov(const uint8_t* buffer, int buffer_size) { switch (atomtype) { case TAG('f','t','y','p'): case TAG('p','d','i','n'): + case TAG('b','l','o','c'): case TAG('m','o','o','v'): case TAG('m','o','o','f'): case TAG('m','f','r','a'): @@ -975,7 +976,7 @@ static bool CheckMov(const uint8_t* buffer, int buffer_size) { case TAG('s','i','d','x'): case TAG('s','s','i','x'): case TAG('p','r','f','t'): - case TAG('b','l','o','c'): + case TAG('u','u','i','d'): break; default: return false; diff --git a/packager/media/formats/mp4/box_reader.cc b/packager/media/formats/mp4/box_reader.cc index 525e8ec725..3ea717ce24 100644 --- a/packager/media/formats/mp4/box_reader.cc +++ b/packager/media/formats/mp4/box_reader.cc @@ -92,6 +92,7 @@ bool BoxReader::IsValidTopLevelBox(const FourCC& type) { case FOURCC_sidx: case FOURCC_ssix: case FOURCC_prft: + case FOURCC_uuid: return true; default: // Hex is used to show nonprintable characters and aid in debugging