From a90c1e365a2458c61d68529e2433aba8d580e1d4 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Mon, 11 Jul 2016 21:07:39 +0200 Subject: [PATCH] StreamProperties: fixed access of AVCodecContext properties if several analysis are launched * There is no need to open/close a codec to access its options. * This update of the codec state (opened/closed) could be problem if there are transcoding operations after the analysis. --- src/AvTranscoder/properties/StreamProperties.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/AvTranscoder/properties/StreamProperties.cpp b/src/AvTranscoder/properties/StreamProperties.cpp index ffc230ec..1c4238bd 100644 --- a/src/AvTranscoder/properties/StreamProperties.cpp +++ b/src/AvTranscoder/properties/StreamProperties.cpp @@ -38,11 +38,7 @@ StreamProperties::StreamProperties(const FileProperties& fileProperties, const s if(_codec) { // load specific options of the codec - if(avcodec_open2(_codecContext, _codec, NULL) == 0) - { - loadOptions(_options, _codecContext); - avcodec_close(_codecContext); - } + loadOptions(_options, _codecContext); } } }