diff options
author | Mohamed Naufal <naufal22@gmail.com> | 2012-04-19 03:00:41 +0530 |
---|---|---|
committer | Mohamed Naufal <naufal22@gmail.com> | 2012-04-19 03:00:41 +0530 |
commit | f51b7e52a6b31e98a82ce48dddac9cabc1e62e04 (patch) | |
tree | 0152fe0812f21df5bf778924f9be1aaf651e23ec | |
parent | 2343a99cf2d7a7d9c10fde3c7687be5d1dd297d7 (diff) | |
download | ffmpeg-f51b7e52a6b31e98a82ce48dddac9cabc1e62e04.tar.gz |
libstagefright: avoid memory leak
-rw-r--r-- | libavcodec/libstagefright.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp index ef45fae9f0..a74c5a3a42 100644 --- a/libavcodec/libstagefright.cpp +++ b/libavcodec/libstagefright.cpp @@ -400,6 +400,8 @@ static int Stagefright_decode_frame(AVCodecContext *avctx, void *data, frame->size = orig_size; } memcpy(frame->buffer, ptr, orig_size); + if (avpkt == &pkt) + av_free(avpkt->data); frame->time = ++s->frame_index; (*s->ts_map)[s->frame_index].pts = avpkt->pts; |