Commit 72d431b6 authored by Dmitry Kovalev's avatar Dmitry Kovalev
Browse files

Removing redundant vpx_free() call.

above_seg_context is alreaded freed during vp9_remove_common() call.

Change-Id: I16b72c710e71d2f143df2d47e876d220c8d374e0
parent ed39c40a
...@@ -164,12 +164,10 @@ VP9D_COMP *vp9_create_decompressor(const VP9D_CONFIG *oxcf) { ...@@ -164,12 +164,10 @@ VP9D_COMP *vp9_create_decompressor(const VP9D_CONFIG *oxcf) {
} }
void vp9_remove_decompressor(VP9D_COMP *pbi) { void vp9_remove_decompressor(VP9D_COMP *pbi) {
VP9_COMMON *const cm = &pbi->common;
int i; int i;
if (!pbi) vp9_remove_common(cm);
return;
vp9_remove_common(&pbi->common);
vp9_worker_end(&pbi->lf_worker); vp9_worker_end(&pbi->lf_worker);
vpx_free(pbi->lf_worker.data1); vpx_free(pbi->lf_worker.data1);
for (i = 0; i < pbi->num_tile_workers; ++i) { for (i = 0; i < pbi->num_tile_workers; ++i) {
...@@ -181,15 +179,11 @@ void vp9_remove_decompressor(VP9D_COMP *pbi) { ...@@ -181,15 +179,11 @@ void vp9_remove_decompressor(VP9D_COMP *pbi) {
vpx_free(pbi->tile_workers); vpx_free(pbi->tile_workers);
if (pbi->num_tile_workers) { if (pbi->num_tile_workers) {
VP9_COMMON *const cm = &pbi->common;
const int sb_rows = const int sb_rows =
mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2; mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2;
VP9LfSync *const lf_sync = &pbi->lf_row_sync; vp9_loop_filter_dealloc(&pbi->lf_row_sync, sb_rows);
vp9_loop_filter_dealloc(lf_sync, sb_rows);
} }
vpx_free(pbi->common.above_seg_context);
vpx_free(pbi); vpx_free(pbi);
} }
......
...@@ -132,6 +132,7 @@ static vpx_codec_err_t vp9_init(vpx_codec_ctx_t *ctx, ...@@ -132,6 +132,7 @@ static vpx_codec_err_t vp9_init(vpx_codec_ctx_t *ctx,
static vpx_codec_err_t vp9_destroy(vpx_codec_alg_priv_t *ctx) { static vpx_codec_err_t vp9_destroy(vpx_codec_alg_priv_t *ctx) {
int i; int i;
if (ctx->pbi)
vp9_remove_decompressor(ctx->pbi); vp9_remove_decompressor(ctx->pbi);
for (i = NELEMENTS(ctx->mmaps) - 1; i >= 0; i--) { for (i = NELEMENTS(ctx->mmaps) - 1; i >= 0; i--) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment