From 25f6aad84fbf8925dc830e70302761da0f95ffe8 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 16 Dec 2016 13:14:11 -0800 Subject: [PATCH] fix memory leaks The series of commits starting with Tim's "libav: remove our custom QSV wrapper." Closes #46, closes #276, and closes #416. --- libhb/encavcodec.c | 2 +- libhb/encavcodecaudio.c | 1 + libhb/scan.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index e90d2bad0..d7a751e6d 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -543,7 +543,7 @@ static void get_packets( hb_work_object_t * w, hb_buffer_list_t * list ) out = process_delay_list(pv, out); hb_buffer_list_append(list, out); - + av_packet_unref(&pkt); } } diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c index f6779fe31..3a6737fc5 100644 --- a/libhb/encavcodecaudio.c +++ b/libhb/encavcodecaudio.c @@ -373,6 +373,7 @@ static void get_packets( hb_work_object_t * w, hb_buffer_list_t * list ) out->s.frametype = HB_FRAME_AUDIO; hb_buffer_list_append(list, out); + av_packet_unref(&pkt); } } diff --git a/libhb/scan.c b/libhb/scan.c index 76e173210..21aa4678c 100644 --- a/libhb/scan.c +++ b/libhb/scan.c @@ -200,7 +200,7 @@ static void ScanFunc( void * _data ) { hb_title_close( &title ); hb_log( "scan: unrecognized file type" ); - return; + goto finish; } } -- 2.40.0