summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-09-05 23:51:00 +0000
committerjstebbins <[email protected]>2014-09-05 23:51:00 +0000
commit40eb8ca79c9af3748c86f908f3da1bff7231a459 (patch)
tree951b3737f37a45208e3fedd3b3a4e10e32e58cd7 /libhb/decavcodec.c
parent3bc51b0b0a02bda3346277ee3f26a96e6089ee19 (diff)
libhb: plug memory leaks
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6394 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c3
1 files changed, 3 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;
}