From 5aff790ae167fc2479eda6348a0ed8da74d11d9a Mon Sep 17 00:00:00 2001 From: JackBurton79 Date: Fri, 24 Aug 2018 09:32:33 +0200 Subject: [PATCH] ffmpeg media reader: remove useless avformat_free_context(): avformat_close_input() already calls it. Change-Id: I45433527459bda430b8f0d15850fdcc019042db3 --- src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp index 111f384935..0ca162b6c1 100644 --- a/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp +++ b/src/add-ons/media/plugins/ffmpeg/AVFormatReader.cpp @@ -212,10 +212,8 @@ StreamBase::StreamBase(BMediaIO* source, BLocker* sourceLock, StreamBase::~StreamBase() { - if (fContext != NULL) - avformat_close_input(&fContext); + avformat_close_input(&fContext); av_free_packet(&fPacket); - avformat_free_context(fContext); if (fIOContext != NULL) av_free(fIOContext->buffer); av_free(fIOContext);