From f9562f537ae9a1fa4949256d44f0ce9a06837edf Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 8 Mar 2018 21:35:30 +0100 Subject: [PATCH] Unref the packet on error Do not leak the packet data on error. --- app/src/decoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/decoder.c b/app/src/decoder.c index 6faaa830..1932875b 100644 --- a/app/src/decoder.c +++ b/app/src/decoder.c @@ -106,6 +106,7 @@ static int run_decoder(void *data) { push_frame(decoder); } else if (ret != AVERROR(EAGAIN)) { LOGE("Could not receive video frame: %d", ret); + av_packet_unref(&packet); goto run_quit; } #else