Skip to content

Commit 090ff3b

Browse files
author
Clement Champetier
committed
StreamProperties: fixed access of AVCodecContext properties if several analysis are launched
* According to the documentation, the avcodec_open2 function does not allocate anything and a call to avcodec_close is not needed. * avcodec_close sets codec attribute of AVCodecContext to NULL, and this is a problem when we would like to transcode after a file analysis.
1 parent 8fd9004 commit 090ff3b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/AvTranscoder/properties/StreamProperties.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ StreamProperties::StreamProperties(const FileProperties& fileProperties, const s
4141
if(avcodec_open2(_codecContext, _codec, NULL) == 0)
4242
{
4343
loadOptions(_options, _codecContext);
44-
avcodec_close(_codecContext);
4544
}
4645
}
4746
}

0 commit comments

Comments
 (0)