aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ttaenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-03-18 07:16:43 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-03 20:56:12 +0200
commit751e334aa91bcba596c77d7cd3b78e7c5f93ef44 (patch)
tree1a0fbb3f970b22a3d928fec971d83025c8bb528e /libavformat/ttaenc.c
parent9b41fddf3ebd23d465960b523ee34329a5f06c42 (diff)
downloadffmpeg-751e334aa91bcba596c77d7cd3b78e7c5f93ef44.tar.gz
avformat/ttaenc: Avoid stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/ttaenc.c')
-rw-r--r--libavformat/ttaenc.c8
1 files 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);
}
}