From: Keith Mok Date: Mon, 14 Mar 2016 19:12:27 +0000 (-0700) Subject: stagefright-plugins: Fix memory leak X-Git-Tag: android-x86-7.1-r1~41 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-stagefright-plugins.git;a=commitdiff_plain;h=c32061cf1cfbd21f7f19f241548a83ae267cd1d1 stagefright-plugins: Fix memory leak Should use av_frame_free to free AVFrame instead of av_freep CYNGNOS-2239 Change-Id: If441761f55d92f3de94ede36a1ec7cfa5b63dfd4 --- diff --git a/omx/SoftFFmpegAudio.cpp b/omx/SoftFFmpegAudio.cpp index 11c6bd9..230af55 100644 --- a/omx/SoftFFmpegAudio.cpp +++ b/omx/SoftFFmpegAudio.cpp @@ -249,7 +249,7 @@ void SoftFFmpegAudio::deInitDecoder() { mCtx = NULL; } if (mFrame) { - av_freep(&mFrame); + av_frame_free(&mFrame); mFrame = NULL; } if (mSwrCtx) { diff --git a/omx/SoftFFmpegVideo.cpp b/omx/SoftFFmpegVideo.cpp index 4e1d348..36b35c6 100644 --- a/omx/SoftFFmpegVideo.cpp +++ b/omx/SoftFFmpegVideo.cpp @@ -147,7 +147,7 @@ void SoftFFmpegVideo::deInitDecoder() { mCtx = NULL; } if (mFrame) { - av_freep(&mFrame); + av_frame_free(&mFrame); mFrame = NULL; } if (mImgConvertCtx) {