Keep in mind: av_free_static() should be only called when your whole applicaiton exit!
Never all av_free_static() in your middle process, otherwise some VLC tables will be destroied!! On Mon, Apr 21, 2008 at 8:00 PM, Thomas Rehaag <[EMAIL PROTECTED]> wrote: > > > > > Dear: > > > > av_register_all() only registers avcodec list and avformat list, it has > no > > any relationship with memory allocation, > > Why do you think av_register_all() causes mem leak? > > > > Sorry!!! I've made a mistake. No memleaks left at all. > But now I've got a new problem. av_find_stream_info crashes, when I try > to reopen the video: > > AVFormatContext *pFormatCtx = 0; > av_register_all(); > > if(av_open_input_file(&pFormatCtx, pVideoPath, NULL, 0, NULL)!=0) > return; > if(av_find_stream_info(pFormatCtx)<0) > return; > av_close_input_file(pFormatCtx); > av_free_static(); > > if(av_open_input_file(&pFormatCtx, pVideoPath, NULL, 0, NULL)!=0) > return; > if(av_find_stream_info(pFormatCtx)<0) > return; > av_close_input_file(pFormatCtx); > av_free_static(); > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > -- ------------------------------------------------- Inspired by http://www.avcoder.net Your potential. Our passion. _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
