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:
parent
2343a99cf2
commit
f51b7e52a6
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user