OSDN Git Service

omx: don't do av_frame_unref
authorChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 21 Apr 2017 02:29:51 +0000 (10:29 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 21 Apr 2017 02:29:51 +0000 (10:29 +0800)
This is done in libav/ffmpeg internally.

omx/SoftFFmpegAudio.cpp
omx/SoftFFmpegVideo.cpp

index 9bae430..b6f018c 100644 (file)
@@ -1151,7 +1151,6 @@ int32_t SoftFFmpegAudio::decodeAudio() {
 
     AVPacket pkt;
     initPacket(&pkt, inHeader);
-    av_frame_unref(mFrame);
 
     len = avcodec_decode_audio4(mCtx, mFrame, &gotFrm, &pkt);
     av_packet_unref(&pkt);
index 101d3ef..d657f09 100644 (file)
@@ -473,8 +473,6 @@ int32_t SoftFFmpegVideo::decodeVideo() {
     AVPacket pkt;
     initPacket(&pkt, inHeader);
 
-    av_frame_unref(mFrame);
-
     err = avcodec_decode_video2(mCtx, mFrame, &gotPic, &pkt);
     av_packet_unref(&pkt);