diff options
Diffstat (limited to 'k9author')
-rw-r--r-- | k9author/k9avidecode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/k9author/k9avidecode.cpp b/k9author/k9avidecode.cpp index c6e1217..4b34608 100644 --- a/k9author/k9avidecode.cpp +++ b/k9author/k9avidecode.cpp @@ -290,9 +290,6 @@ void k9AviDecode::close() { // Free the YUV frame av_free(m_Frame); - // Close the codec - avcodec_close(m_CodecCtx); - // Close the video file #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0) avformat_close_input(&m_FormatCtx); @@ -300,8 +297,11 @@ void k9AviDecode::close() { av_close_input_file(m_FormatCtx); #endif + // Close the codec #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) avcodec_free_context(&m_CodecCtx); +#else + avcodec_close(m_CodecCtx); #endif m_opened=false; |