diff options
-rw-r--r-- | libhb/decavcodec.c | 3 | ||||
-rw-r--r-- | libhb/muxavformat.c | 1 | ||||
-rw-r--r-- | libhb/muxcommon.c | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index c10a599a6..129b43f2f 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -700,6 +700,7 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, dec_len = avcodec_decode_audio4(context, frame, &got_frame, &avp); if (dec_len < 0) { + av_frame_free(&frame); break; } if (dec_len > 0 && got_frame) @@ -774,9 +775,11 @@ static int decavcodecaBSInfo( hb_work_object_t *w, const hb_buffer_t *buf, } ret = 1; + av_frame_free(&frame); break; } dec_pos += dec_len; + av_frame_free(&frame); } parse_pos += parse_len; } diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index 34e76fd46..8186c5bd2 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -1314,6 +1314,7 @@ static int avformatEnd(hb_mux_object_t *m) av_write_trailer(m->oc); avio_close(m->oc->pb); avformat_free_context(m->oc); + free(m->tracks); m->oc = NULL; return 0; diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index a555f95c4..a4c3c9cc8 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -538,6 +538,7 @@ void muxClose( hb_work_object_t * w ) } free( track ); } + free(mux->track); hb_unlock( mux->mutex ); hb_lock_close( &mux->mutex ); hb_bitvec_free(&mux->eof); |