diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-04 21:46:58 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-04 21:46:58 +0200 |
commit | ea912913de55917525c6de6a9aca337e609384fb (patch) | |
tree | c8f7fa747f1d611f607b06a45caf983c587ef32b /decoders | |
parent | 16e1e247638aa0da5541aa78fb141e60744d56a0 (diff) |
Fixed segfault in ~DecderFFmpeg().
avcodec_close() should be called first, because it's connected to the
format context which is also freed here by av_close_input_file().
Diffstat (limited to 'decoders')
-rw-r--r-- | decoders/ffmpeg_decoder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoders/ffmpeg_decoder.cpp b/decoders/ffmpeg_decoder.cpp index 7b7397f..7a34724 100644 --- a/decoders/ffmpeg_decoder.cpp +++ b/decoders/ffmpeg_decoder.cpp @@ -24,8 +24,8 @@ DecoderFFmpeg::DecoderFFmpeg(const std::string& filename) { } DecoderFFmpeg::~DecoderFFmpeg() { - av_close_input_file(lavf_ctx); avcodec_close(lavc_ctx); + av_close_input_file(lavf_ctx); } std::size_t DecoderFFmpeg::read(char* buf, std::size_t buf_size) { |