Index: source/libvpx/vp9/decoder/vp9_decoder.c |
=================================================================== |
--- source/libvpx/vp9/decoder/vp9_decoder.c (revision 282873) |
+++ source/libvpx/vp9/decoder/vp9_decoder.c (working copy) |
@@ -85,7 +85,6 @@ |
VP9_COMMON *const cm = &pbi->common; |
int i; |
- vp9_remove_common(cm); |
vp9_get_worker_interface()->end(&pbi->lf_worker); |
vpx_free(pbi->lf_worker.data1); |
vpx_free(pbi->tile_data); |
@@ -103,6 +102,7 @@ |
vp9_loop_filter_dealloc(&pbi->lf_row_sync, sb_rows); |
} |
+ vp9_remove_common(cm); |
vpx_free(pbi); |
} |
@@ -246,6 +246,7 @@ |
if (setjmp(cm->error.jmp)) { |
cm->error.setjmp = 0; |
+ vp9_clear_system_state(); |
// We do not know if the missing frame(s) was supposed to update |
// any of the reference buffers, but we act conservative and |
@@ -267,7 +268,10 @@ |
vp9_decode_frame(pbi, source, source + size, psource); |
- swap_frame_buffers(pbi); |
+ if (!cm->show_existing_frame) |
+ swap_frame_buffers(pbi); |
+ else |
+ cm->frame_to_show = get_frame_new_buffer(cm); |
vp9_clear_system_state(); |
@@ -291,6 +295,7 @@ |
int vp9_get_raw_frame(VP9Decoder *pbi, YV12_BUFFER_CONFIG *sd, |
vp9_ppflags_t *flags) { |
+ VP9_COMMON *const cm = &pbi->common; |
int ret = -1; |
#if !CONFIG_VP9_POSTPROC |
(void)*flags; |
@@ -300,15 +305,20 @@ |
return ret; |
/* no raw frame to show!!! */ |
- if (pbi->common.show_frame == 0) |
+ if (!cm->show_frame) |
return ret; |
pbi->ready_for_new_data = 1; |
#if CONFIG_VP9_POSTPROC |
- ret = vp9_post_proc_frame(&pbi->common, sd, flags); |
+ if (!cm->show_existing_frame) { |
+ ret = vp9_post_proc_frame(cm, sd, flags); |
+ } else { |
+ *sd = *cm->frame_to_show; |
+ ret = 0; |
+ } |
#else |
- *sd = *pbi->common.frame_to_show; |
+ *sd = *cm->frame_to_show; |
ret = 0; |
#endif /*!CONFIG_POSTPROC*/ |
vp9_clear_system_state(); |