allow config options to limit max size of decode

This is a practical concern to allow us to fail in a decoder instance
if the size of a file is bigger than we can reasonably handle.

Change-Id: I0446b5502b1f8a48408107648ff2a8d187dca393
This commit is contained in:
Jim Bankoski
2014-07-17 06:31:50 -07:00
committed by Gerrit Code Review
parent 1a01194ab5
commit 943e43273b
9 changed files with 152 additions and 3 deletions

View File

@@ -127,6 +127,10 @@ class DummyVideoSource : public VideoSource {
virtual unsigned int limit() const { return limit_; }
void set_limit(unsigned int limit) {
limit_ = limit;
}
void SetSize(unsigned int width, unsigned int height) {
if (width != width_ || height != height_) {
vpx_img_free(img_);