diff options
Diffstat (limited to 'media/base/video_decoder_config.cc')
-rw-r--r-- | media/base/video_decoder_config.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc index d055f49..6a7add8 100644 --- a/media/base/video_decoder_config.cc +++ b/media/base/video_decoder_config.cc @@ -7,6 +7,7 @@ #include <cmath> #include "base/logging.h" +#include "media/base/limits.h" namespace media { @@ -90,7 +91,10 @@ bool VideoDecoderConfig::IsValidConfig() const { frame_rate_numerator_ > 0 && frame_rate_denominator_ > 0 && aspect_ratio_numerator_ > 0 && - aspect_ratio_denominator_ > 0; + aspect_ratio_denominator_ > 0 && + natural_size_.width() <= Limits::kMaxDimension && + natural_size_.height() <= Limits::kMaxDimension && + natural_size_.GetArea() <= Limits::kMaxCanvas; } VideoCodec VideoDecoderConfig::codec() const { |