| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 if (setjmp(cm->error.jmp)) { | 253 if (setjmp(cm->error.jmp)) { |
| 254 cm->error.setjmp = 0; | 254 cm->error.setjmp = 0; |
| 255 | 255 |
| 256 // We do not know if the missing frame(s) was supposed to update | 256 // We do not know if the missing frame(s) was supposed to update |
| 257 // any of the reference buffers, but we act conservative and | 257 // any of the reference buffers, but we act conservative and |
| 258 // mark only the last buffer as corrupted. | 258 // mark only the last buffer as corrupted. |
| 259 // | 259 // |
| 260 // TODO(jkoleszar): Error concealment is undefined and non-normative | 260 // TODO(jkoleszar): Error concealment is undefined and non-normative |
| 261 // at this point, but if it becomes so, [0] may not always be the correct | 261 // at this point, but if it becomes so, [0] may not always be the correct |
| 262 // thing to do here. | 262 // thing to do here. |
| 263 if (cm->frame_refs[0].idx != INT_MAX) | 263 if (cm->frame_refs[0].idx != INT_MAX && cm->frame_refs[0].buf != NULL) |
| 264 cm->frame_refs[0].buf->corrupted = 1; | 264 cm->frame_refs[0].buf->corrupted = 1; |
| 265 | 265 |
| 266 if (cm->frame_bufs[cm->new_fb_idx].ref_count > 0) | 266 if (cm->new_fb_idx > 0 && cm->frame_bufs[cm->new_fb_idx].ref_count > 0) |
| 267 cm->frame_bufs[cm->new_fb_idx].ref_count--; | 267 cm->frame_bufs[cm->new_fb_idx].ref_count--; |
| 268 | 268 |
| 269 return -1; | 269 return -1; |
| 270 } | 270 } |
| 271 | 271 |
| 272 cm->error.setjmp = 1; | 272 cm->error.setjmp = 1; |
| 273 | 273 |
| 274 vp9_decode_frame(pbi, source, source + size, psource); | 274 vp9_decode_frame(pbi, source, source + size, psource); |
| 275 | 275 |
| 276 swap_frame_buffers(pbi); | 276 swap_frame_buffers(pbi); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 | 313 |
| 314 #if CONFIG_VP9_POSTPROC | 314 #if CONFIG_VP9_POSTPROC |
| 315 ret = vp9_post_proc_frame(&pbi->common, sd, flags); | 315 ret = vp9_post_proc_frame(&pbi->common, sd, flags); |
| 316 #else | 316 #else |
| 317 *sd = *pbi->common.frame_to_show; | 317 *sd = *pbi->common.frame_to_show; |
| 318 ret = 0; | 318 ret = 0; |
| 319 #endif /*!CONFIG_POSTPROC*/ | 319 #endif /*!CONFIG_POSTPROC*/ |
| 320 vp9_clear_system_state(); | 320 vp9_clear_system_state(); |
| 321 return ret; | 321 return ret; |
| 322 } | 322 } |
| OLD | NEW |