OSDN Git Service

stagefright-plugins: Fix memory leak
authorKeith Mok <kmok@cyngn.com>
Mon, 14 Mar 2016 19:12:27 +0000 (12:12 -0700)
committerEthan Chen <intervigil@gmail.com>
Tue, 15 Mar 2016 00:14:44 +0000 (17:14 -0700)
Should use av_frame_free to free AVFrame
instead of av_freep

CYNGNOS-2239

Change-Id: If441761f55d92f3de94ede36a1ec7cfa5b63dfd4

omx/SoftFFmpegAudio.cpp
omx/SoftFFmpegVideo.cpp

index 11c6bd9..230af55 100644 (file)
@@ -249,7 +249,7 @@ void SoftFFmpegAudio::deInitDecoder() {
         mCtx = NULL;
     }
     if (mFrame) {
-        av_freep(&mFrame);
+        av_frame_free(&mFrame);
         mFrame = NULL;
     }
     if (mSwrCtx) {
index 4e1d348..36b35c6 100644 (file)
@@ -147,7 +147,7 @@ void SoftFFmpegVideo::deInitDecoder() {
         mCtx = NULL;
     }
     if (mFrame) {
-        av_freep(&mFrame);
+        av_frame_free(&mFrame);
         mFrame = NULL;
     }
     if (mImgConvertCtx) {