summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/AVIDump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon/AVIDump.cpp')
-rw-r--r--Source/Core/VideoCommon/AVIDump.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp
index d82de483fb..04cdcca5d7 100644
--- a/Source/Core/VideoCommon/AVIDump.cpp
+++ b/Source/Core/VideoCommon/AVIDump.cpp
@@ -323,7 +323,13 @@ void AVIDump::CloseVideoFile()
av_frame_free(&s_scaled_frame);
avcodec_free_context(&s_codec_context);
+
+ if (s_format_context)
+ {
+ avio_closep(&s_format_context->pb);
+ }
avformat_free_context(s_format_context);
+ s_format_context = nullptr;
if (s_sws_context)
{