ref: f999d791e0a53f22db187cb65fa131f48d8ba9c4
parent: f2cb97bbda4eb8919da614aa07b879f8a92ba665
parent: 52a39f75f25e3c596b39ceff4d07c22c58d90c18
author: Yaowu Xu <[email protected]>
date: Tue Oct 15 10:28:21 EDT 2013
Merge "Added trap for invalid key frame"
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -955,9 +955,15 @@
YV12_BUFFER_CONFIG *new_fb = &cm->yv12_fb[cm->new_fb_idx];
if (!first_partition_size) {
- // showing a frame directly
- *p_data_end = data + 1;
- return 0;
+ if (!keyframe) {
+ // showing a frame directly
+ *p_data_end = data + 1;
+ return 0;
+ } else {
+ vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
+ "Invalid key frame");
+ return -1;
+ }
}
data += vp9_rb_bytes_read(&rb);
xd->corrupted = 0;