ref: 904cb53302dfebee4a0d795ad6ccebdd5da5f542
parent: aea8d97a74ae8102a864baa1439dd4f4f25555e9
parent: 6f51672c4ec334e3978301ecb3c6847c2d33b19b
author: Johann Koenig <johannkoenig@chromium.org>
date: Tue Mar 29 18:36:42 EDT 2016
Merge "Properly propagate out of memory errors."
--- a/vp9/decoder/vp9_decoder.c
+++ b/vp9/decoder/vp9_decoder.c
@@ -213,8 +213,11 @@
// Find an empty frame buffer.
const int free_fb = get_free_fb(cm);
- if (cm->new_fb_idx == INVALID_IDX)
- return VPX_CODEC_MEM_ERROR;
+ if (cm->new_fb_idx == INVALID_IDX) {
+ vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ "Unable to find free frame buffer");
+ return cm->error.error_code;
+ }
// Decrease ref_count since it will be increased again in
// ref_cnt_fb() below.
@@ -305,8 +308,11 @@
&frame_bufs[cm->new_fb_idx].raw_frame_buffer);
// Find a free frame buffer. Return error if can not find any.
cm->new_fb_idx = get_free_fb(cm);
- if (cm->new_fb_idx == INVALID_IDX)
- return VPX_CODEC_MEM_ERROR;
+ if (cm->new_fb_idx == INVALID_IDX) {
+ vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
+ "Unable to find free frame buffer");
+ return cm->error.error_code;
+ }
// Assign a MV array to the frame buffer.
cm->cur_frame = &pool->frame_bufs[cm->new_fb_idx];
--
⑨