Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: media/base/container_names.cc

Issue 2819863003: Only run container name detection upon ffmpeg parse failure. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/container_names.cc
diff --git a/media/base/container_names.cc b/media/base/container_names.cc
index 34875b51f0f2b4b9859b8e561e5416da179728ab..afa71cad34eee53046b60d482b2b5242ccfdc26e 100644
--- a/media/base/container_names.cc
+++ b/media/base/container_names.cc
@@ -1425,7 +1425,7 @@ static const uint8_t kWtvSignature[] = {0xb7, 0xd8, 0x00, 0x20, 0x37, 0x49,
static MediaContainerName LookupContainerByFirst4(const uint8_t* buffer,
int buffer_size) {
// Minimum size that the code expects to exist without checking size.
- if (buffer_size < 12)
+ if (buffer_size < kMinimumContainerSize)
return CONTAINER_UNKNOWN;
uint32_t first4 = Read32(buffer);

Powered by Google App Engine
This is Rietveld 408576698