Commit f51b7e52 authored by Mohamed Naufal's avatar Mohamed Naufal

libstagefright: avoid memory leak

parent 2343a99c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment