Merge "Fix the initial references to frame buffers."

This commit is contained in:
Frank Galligan
2013-12-04 19:26:40 -08:00
committed by Gerrit Code Review
3 changed files with 7 additions and 8 deletions

View File

@@ -687,12 +687,6 @@ static void apply_frame_size(VP9D_COMP *pbi, int width, int height) {
if (cm->width != width || cm->height != height) {
// Change in frame size.
if (cm->width == 0 || cm->height == 0) {
// Assign new frame buffer on first call.
cm->new_fb_idx = NUM_YV12_BUFFERS - 1;
cm->fb_idx_ref_cnt[cm->new_fb_idx] = 1;
}
// TODO(agrange) Don't test width/height, check overall size.
if (width > cm->width || height > cm->height) {
// Rescale frame buffers only if they're not big enough already.

View File

@@ -125,6 +125,9 @@ VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
vp9_zero(*pbi);
// Initialize the references to not point to any frame buffers.
memset(&cm->ref_frame_map, -1, sizeof(cm->ref_frame_map));
if (setjmp(cm->error.jmp)) {
cm->error.setjmp = 0;
vp9_remove_decompressor(pbi);