summaryrefslogtreecommitdiff
path: root/vp8/decoder/decodeframe.c
diff options
context:
space:
mode:
authorJoey Parrish <joeyparrish@google.com>2014-04-15 14:10:58 -0700
committerJoey Parrish <joeyparrish@google.com>2014-04-23 16:11:54 -0700
commit18c08607e0a216962fd3df4f7926ce288ee81b9b (patch)
tree471f1eafca2091dc47a18288b6999165d5ac2a7b /vp8/decoder/decodeframe.c
parentdddc3c6906f0d840935214ab0b26ea9a6e06cc27 (diff)
downloadlibvpx-18c08607e0a216962fd3df4f7926ce288ee81b9b.tar
libvpx-18c08607e0a216962fd3df4f7926ce288ee81b9b.tar.gz
libvpx-18c08607e0a216962fd3df4f7926ce288ee81b9b.tar.bz2
libvpx-18c08607e0a216962fd3df4f7926ce288ee81b9b.zip
Add VPXD_SET_DECRYPTOR support to the VP9 decoder.
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
Diffstat (limited to 'vp8/decoder/decodeframe.c')
-rw-r--r--vp8/decoder/decodeframe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp8/decoder/decodeframe.c b/vp8/decoder/decodeframe.c
index 14f611ad9..e7cf0d9b9 100644
--- a/vp8/decoder/decodeframe.c
+++ b/vp8/decoder/decodeframe.c
@@ -17,6 +17,7 @@
#include "vp8/common/reconintra4x4.h"
#include "vp8/common/reconinter.h"
#include "detokenize.h"
+#include "vp8/common/common.h"
#include "vp8/common/invtrans.h"
#include "vp8/common/alloccommon.h"
#include "vp8/common/entropymode.h"
@@ -1018,8 +1019,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
const unsigned char *clear = data;
if (pbi->decrypt_cb)
{
- int n = (int)(data_end - data);
- if (n > 10) n = 10;
+ int n = (int)MIN(sizeof(clear_buffer), data_end - data);
pbi->decrypt_cb(pbi->decrypt_state, data, clear_buffer, n);
clear = clear_buffer;
}