projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a83e1ca
)
Correctly close all codecs, I think.
author
Carl Hetherington
<cth@carlh.net>
Thu, 22 May 2014 14:07:31 +0000
(15:07 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 22 May 2014 14:07:31 +0000
(15:07 +0100)
src/lib/ffmpeg.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg.cc
b/src/lib/ffmpeg.cc
index 017960f2a26ef46de980c1622a912efa7bfa87af..ec7ec452e37683bfe374a16589d56c49377df562 100644
(file)
--- a/
src/lib/ffmpeg.cc
+++ b/
src/lib/ffmpeg.cc
@@
-57,14
+57,10
@@
FFmpeg::~FFmpeg ()
boost::mutex::scoped_lock lm (_mutex);
for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
- AVCodecContext* context = _format_context->streams[i]->codec;
- if (context->codec_type == AVMEDIA_TYPE_VIDEO || context->codec_type == AVMEDIA_TYPE_AUDIO) {
- avcodec_close (context);
- }
+ avcodec_close (_format_context->streams[i]->codec);
}
av_frame_free (&_frame);
-
avformat_close_input (&_format_context);
}