libstagefright: avoid memory leak
This commit is contained in:
parent
2343a99cf2
commit
f51b7e52a6
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue