Bug 779416 - Shrink some unnecessarily large char arrays used for codec types. r=cpearce

This commit is contained in:
Matthew Gregan 2012-08-01 18:15:27 +12:00
parent 7825395ee4
commit ecf5adaec3
2 changed files with 8 additions and 8 deletions

View File

@ -289,21 +289,21 @@ public:
#ifdef MOZ_WAVE
static bool IsWaveEnabled();
static bool IsWaveType(const nsACString& aType);
static const char gWaveTypes[4][16];
static const char gWaveTypes[4][15];
static char const *const gWaveCodecs[2];
#endif
#ifdef MOZ_WEBM
static bool IsWebMEnabled();
static bool IsWebMType(const nsACString& aType);
static const char gWebMTypes[2][17];
static const char gWebMTypes[2][11];
static char const *const gWebMCodecs[4];
#endif
#ifdef MOZ_GSTREAMER
static bool IsH264Enabled();
static bool IsH264Type(const nsACString& aType);
static const char gH264Types[3][17];
static const char gH264Types[3][16];
static char const *const gH264Codecs[7];
#endif

View File

@ -1959,12 +1959,12 @@ void nsHTMLMediaElement::UnbindFromTree(bool aDeep,
}
#ifdef MOZ_RAW
static const char gRawTypes[][16] = {
static const char gRawTypes[2][16] = {
"video/x-raw",
"video/x-raw-yuv"
};
static const char* gRawCodecs[] = {
static const char* gRawCodecs[1] = {
nullptr
};
@ -2048,7 +2048,7 @@ nsHTMLMediaElement::IsOggType(const nsACString& aType)
// See http://www.rfc-editor.org/rfc/rfc2361.txt for the definitions
// of WAVE media types and codec types. However, the audio/vnd.wave
// MIME type described there is not used.
const char nsHTMLMediaElement::gWaveTypes[4][16] = {
const char nsHTMLMediaElement::gWaveTypes[4][15] = {
"audio/x-wav",
"audio/wav",
"audio/wave",
@ -2084,7 +2084,7 @@ nsHTMLMediaElement::IsWaveType(const nsACString& aType)
#endif
#ifdef MOZ_WEBM
const char nsHTMLMediaElement::gWebMTypes[2][17] = {
const char nsHTMLMediaElement::gWebMTypes[2][11] = {
"video/webm",
"audio/webm"
};
@ -2120,7 +2120,7 @@ nsHTMLMediaElement::IsWebMType(const nsACString& aType)
#endif
#ifdef MOZ_GSTREAMER
const char nsHTMLMediaElement::gH264Types[3][17] = {
const char nsHTMLMediaElement::gH264Types[3][16] = {
"video/mp4",
"video/3gpp",
"video/quicktime",