unref hw_device_ctx on Close. I think this should release all the other hwaccel related stuff

This commit is contained in:
Isaac Connor 2019-07-19 12:51:31 -04:00
parent fcee031785
commit f3166663a5
1 changed files with 3 additions and 3 deletions

View File

@ -682,13 +682,13 @@ int FfmpegCamera::Close() {
#endif
mAudioCodecContext = NULL; // Freed by av_close_input_file
}
#if 0
#if HAVE_LIBAVUTIL_HWCONTEXT_H
if ( hw_device_ctx ) {
hwdevice_ctx_free
av_buffer_unref(&hw_device_ctx);
}
#endif
if ( mFormatContext ) {
#if !LIBAVFORMAT_VERSION_CHECK(53, 17, 0, 25, 0)
av_close_input_file(mFormatContext);