ffmpeg plugin: use avformat/codec_free_context() where applicable

This commit is contained in:
JackBurton79
2018-08-14 14:43:30 +02:00
parent a4e89ff894
commit 1d404e45f1
3 changed files with 3 additions and 3 deletions
@@ -158,7 +158,7 @@ AVCodecDecoder::~AVCodecDecoder()
av_free(fRawDecodedPicture);
av_free(fRawDecodedAudio->opaque);
av_free(fRawDecodedAudio);
av_free(fCodecContext);
avcodec_free_context(&fCodecContext);
av_free(fDecodedDataBuffer);
av_frame_free(&fFilterFrame);
@@ -113,7 +113,7 @@ AVCodecEncoder::~AVCodecEncoder()
av_free(fFrame);
}
av_free(fOwnContext);
avcodec_free_context(&fOwnContext);
delete[] fChunkBuffer;
}
@@ -215,7 +215,7 @@ StreamBase::~StreamBase()
if (fContext != NULL)
avformat_close_input(&fContext);
av_free_packet(&fPacket);
av_free(fContext);
avformat_free_context(fContext);
if (fIOContext != NULL)
av_free(fIOContext->buffer);
av_free(fIOContext);