diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-09-26 09:54:56 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-09-26 09:54:56 +0900 |
commit | 1f8ddde027f9da9dc32a7e33bd50c970c562946b (patch) | |
tree | c2c51ca4149b3544fe2102808e3b17ae143eef91 | |
parent | 75a4ed1d3e9193d6312fe205f57c38bd21764c96 (diff) | |
download | k9copy-improve/avcodec_close.tar.gz k9copy-improve/avcodec_close.zip |
Fix location of call to avcodec_close for old version of libavcodecimprove/avcodec_close
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | k9author/k9avidecode.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/k9author/k9avidecode.cpp b/k9author/k9avidecode.cpp index 4b34608..e79cb14 100644 --- a/k9author/k9avidecode.cpp +++ b/k9author/k9avidecode.cpp @@ -290,13 +290,6 @@ void k9AviDecode::close() { // Free the YUV frame av_free(m_Frame); - // Close the video file -#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0) - avformat_close_input(&m_FormatCtx); -#else - 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); @@ -304,6 +297,13 @@ void k9AviDecode::close() { avcodec_close(m_CodecCtx); #endif + // Close the video file +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0) + avformat_close_input(&m_FormatCtx); +#else + av_close_input_file(m_FormatCtx); +#endif + m_opened=false; } } |