1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

libstagefright: avoid memory leak

This commit is contained in:
Mohamed Naufal 2012-04-19 03:00:41 +05:30
parent 2343a99cf2
commit f51b7e52a6

View File

@ -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;