Commit 568bf107 authored by Yaowu Xu's avatar Yaowu Xu

Move a call to free

This insures the pointer is still valid.

BUG=aomedia:919

Change-Id: Ia6f37c1bcc82bc1078387db31f8d8bf0fddc297e
parent ade9a0ec
......@@ -125,6 +125,10 @@ static aom_codec_err_t decoder_destroy(aom_codec_alg_priv_t *ctx) {
FrameWorkerData *const frame_worker_data =
(FrameWorkerData *)worker->data1;
aom_get_worker_interface()->end(worker);
#if CONFIG_MFMV
aom_free(frame_worker_data->pbi->common.tpl_mvs);
frame_worker_data->pbi->common.tpl_mvs = NULL;
#endif
av1_remove_common(&frame_worker_data->pbi->common);
#if CONFIG_LOOP_RESTORATION
av1_free_restoration_buffers(&frame_worker_data->pbi->common);
......@@ -134,10 +138,6 @@ static aom_codec_err_t decoder_destroy(aom_codec_alg_priv_t *ctx) {
#if CONFIG_MULTITHREAD
pthread_mutex_destroy(&frame_worker_data->stats_mutex);
pthread_cond_destroy(&frame_worker_data->stats_cond);
#endif
#if CONFIG_MFMV
aom_free(frame_worker_data->pbi->common.tpl_mvs);
frame_worker_data->pbi->common.tpl_mvs = NULL;
#endif
aom_free(frame_worker_data);
}
......
Markdown is supported
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