summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index 017960f2a..ec7ec452e 100644
--- 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);
}