Jackarain / avplayer

一个基于FFmpeg、libtorrent的P2P播放器实现
421 stars 265 forks source link

采用OpenGL作为Renderer时,av_stop()发现内存泄漏 #19

Closed ianzh closed 11 years ago

ianzh commented 11 years ago

环境为Win7+VS10

跟踪发现opengl_render::KillGLWindow()中 wglMakeCurrent(NULL, NULL)和wglDeleteContext()均失败

http://technet.microsoft.com/zh-cn/library/dd374257 对wglMakeCurrent(NULL, NULL);的解释为 // detach the current rendering context from the thread

是不是意味着detach与初始化必须在同一线程(即video_render_thrd)中调用。

作为实验,在video_render_thrd最后return NULL前加入 play->m_vo_ctx->destory_video(play->m_vo_ctx); 貌似内存泄漏得到解决

最后,谢谢你们的这个项目,希望我也能贡献一份力量:)

Jackarain commented 11 years ago

谢谢你的问题提交, 我马上看看.

Jackarain commented 11 years ago

3q, 已经按照你说的方式修正.