From 751e334aa91bcba596c77d7cd3b78e7c5f93ef44 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 18 Mar 2021 07:16:43 +0100 Subject: [PATCH] avformat/ttaenc: Avoid stack packet Signed-off-by: Andreas Rheinhardt --- libavformat/ttaenc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c index 5f66695a9a..11855c32d9 100644 --- a/libavformat/ttaenc.c +++ b/libavformat/ttaenc.c @@ -123,12 +123,12 @@ static int tta_write_packet(AVFormatContext *s, AVPacket *pkt) static void tta_queue_flush(AVFormatContext *s) { TTAMuxContext *tta = s->priv_data; - AVPacket pkt; + AVPacket *const pkt = ffformatcontext(s)->pkt; while (tta->queue) { - avpriv_packet_list_get(&tta->queue, &tta->queue_end, &pkt); - avio_write(s->pb, pkt.data, pkt.size); - av_packet_unref(&pkt); + avpriv_packet_list_get(&tta->queue, &tta->queue_end, pkt); + avio_write(s->pb, pkt->data, pkt->size); + av_packet_unref(pkt); } }