Message ID | CADxeRwmZ-VbNc78JsVHksHcquK0EFp0r3gM5P3nE+QmFA_R3Ew@mail.gmail.com |
---|---|
State | Rejected |
Headers | show |
On Fri, 2 Sep 2016, Steven Liu wrote: > ffplay: fix memleak in audio_thread > > Signed-off-by: LiuQi <liuqi@gosun.com> > --- > ffplay.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ffplay.c b/ffplay.c > index adbe9cb..d7f7200 100644 > --- a/ffplay.c > +++ b/ffplay.c > @@ -2127,7 +2127,7 @@ static int audio_thread(void *arg) > > av_frame_move_ref(af->frame, frame); > frame_queue_push(&is->sampq); > - > + av_frame_unref(frame); Why is this a mem leak? The av_frame_move_ref call should clear everything in frame, if that is not the case, then I think the bug is deeper within the API. Regards, Marton
diff --git a/ffplay.c b/ffplay.c index adbe9cb..d7f7200 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2127,7 +2127,7 @@ static int audio_thread(void *arg) av_frame_move_ref(af->frame, frame); frame_queue_push(&is->sampq); - + av_frame_unref(frame); #if CONFIG_AVFILTER if (is->audioq.serial != is->auddec.pkt_serial) break;
ffplay: fix memleak in audio_thread Signed-off-by: LiuQi <liuqi@gosun.com> --- ffplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 (Apple Git-66)