[問題] ffmpeg memory leak

看板C_and_CPP作者 (vieux)時間11年前 (2014/07/24 14:52), 11年前編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) VS2012 MFC 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) ffmpeg with x264 問題(Question): 我是使用_CrtDumpMemoryLeaks();來看是否有memory leak, 雖然無法指向正確的位置,但是可以得知是否有memory leak, 目前發現在 avformat_close_input(&pFormatCtx); 就會出現memory leak的警告,就算將pFormatCtx設成NULL之後 再avformat_close_input,還是會出現警告。 這是ffmpeg本身的問題嗎?還是我哪邊有弄錯了? 不知道是否有高手指點一下 餵入的資料(Input): camera devices 預期的正確結果(Expected Output): 沒有memory leak 錯誤結果(Wrong Output): 出現memory leak,使用的記憶體無法釋放 程式碼(Code):(請善用置底文網頁, 記得排版) http://ideone.com/NJwjfWa 補充說明(Supplement): 主要程式碼是在OnStartThred() 除了avformat_close_input應該還有其他地方有memory leak... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.231.16.7 ※ 文章網址: http://www.ptt.cc/bbs/C_and_CPP/M.1406184744.A.EB0.html ※ 編輯: sosokill (36.231.16.7), 07/24/2014 14:54:21 ※ 編輯: sosokill (61.221.177.189), 11/18/2014 15:54:16
文章代碼(AID): #1JqAqewm (C_and_CPP)