OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2343a99
)
libstagefright: avoid memory leak
author
Mohamed Naufal
<naufal22@gmail.com>
Wed, 18 Apr 2012 21:30:41 +0000
(
03:00
+0530)
committer
Mohamed Naufal
<naufal22@gmail.com>
Wed, 18 Apr 2012 21:30:41 +0000
(
03:00
+0530)
libavcodec/libstagefright.cpp
patch
|
blob
|
history
diff --git
a/libavcodec/libstagefright.cpp
b/libavcodec/libstagefright.cpp
index
ef45fae
..
a74c5a3
100644
(file)
--- 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;