From: James Zern Date: Wed, 9 Jul 2014 18:08:06 +0000 (-0700) Subject: vp9_decoder_remove: destroy common after thread shutdown X-Git-Tag: v1.4.0~1246^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e0588bc46b073d8bf65600facdcb31d6876d531;p=libvpx vp9_decoder_remove: destroy common after thread shutdown in a failure case the threads may still be running and share a reference to VP9_COMMON Change-Id: I867034b4b55f133663b8cbf6ca06e72acf952849 --- diff --git a/vp9/decoder/vp9_decoder.c b/vp9/decoder/vp9_decoder.c index d154e9d81..a0bd2f124 100644 --- a/vp9/decoder/vp9_decoder.c +++ b/vp9/decoder/vp9_decoder.c @@ -85,7 +85,6 @@ void vp9_decoder_remove(VP9Decoder *pbi) { 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 @@ void vp9_decoder_remove(VP9Decoder *pbi) { vp9_loop_filter_dealloc(&pbi->lf_row_sync, sb_rows); } + vp9_remove_common(cm); vpx_free(pbi); }