android: fix video hang when switching high/low resolution

parent 3ebe0396
......@@ -194,6 +194,9 @@ public class AndroidVideoWindowImpl {
}
public void setOpenGLESDisplay(int ptr) {
if (this.ptr != 0 && ptr != this.ptr) {
initPending = true;
}
this.ptr = ptr;
}
......
......@@ -98,11 +98,15 @@ struct opengles_display* ogl_display_new() {
memset(result, 0, sizeof(struct opengles_display));
ms_mutex_init(&result->yuv_mutex, NULL);
ms_message("%s : %p\n", __FUNCTION__, result);
return result;
}
void ogl_display_free(struct opengles_display* gldisp) {
if (gldisp->yuv) {
ms_free(gldisp->yuv);
gldisp->yuv = NULL;
}
ms_mutex_destroy(&gldisp->yuv_mutex);
free(gldisp);
......
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