Skip to content

Commit a90c1e3

Browse files
author
Clement Champetier
committed
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.
1 parent 8fd9004 commit a90c1e3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/AvTranscoder/properties/StreamProperties.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ StreamProperties::StreamProperties(const FileProperties& fileProperties, const s
3838
if(_codec)
3939
{
4040
// load specific options of the codec
41-
if(avcodec_open2(_codecContext, _codec, NULL) == 0)
42-
{
43-
loadOptions(_options, _codecContext);
44-
avcodec_close(_codecContext);
45-
}
41+
loadOptions(_options, _codecContext);
4642
}
4743
}
4844
}

0 commit comments

Comments
 (0)