void render_close(void *hrender) { RENDER *render = (RENDER*)hrender; //++ audio ++// // destroy adev adev_destroy(render->adev); // free swr context swr_free(&render->pSWRContext); //-- audio --// //++ video ++// // destroy vdev vdev_destroy(render->vdev); // free sws context if (render->pSWSContext) { sws_freeContext(render->pSWSContext); } //-- video --// // free context free(render); }
void render_close(void *hrender) { RENDER *render = (RENDER*)hrender; // wait visual effect thread exit render->render_status = RENDER_CLOSE; #if CONFIG_ENABLE_VEFFECT pthread_join(render->veffect_thread, NULL); veffect_destroy(render->veffect_context); #endif //++ audio ++// // destroy adev adev_destroy(render->adev); // free swr context swr_free(&render->swr_context); //-- audio --// //++ video ++// // destroy vdev vdev_destroy(render->vdev); // free sws context if (render->sws_context) { sws_freeContext(render->sws_context); } //-- video --// // free context free(render); }