libarmbox/video.cpp: image_to_mpeg2 fix memleak

This commit is contained in:
Jacek Jendrzej
2020-01-05 17:45:32 +01:00
parent db244f0b8a
commit c4e474a48e

View File

@@ -346,6 +346,7 @@ int image_to_mpeg2(const char *image_name, int fd)
av_packet_unref(&packet);
}
avcodec_close(codecContext);
av_free(codecContext);
}
avformat_close_input(&formatContext);
}