[FFmpeg-cvslog] avformat/ttaenc: Avoid stack packet
Andreas Rheinhardt
git at videolan.org
Sun Oct 3 23:49:00 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Mar 18 07:16:43 2021 +0100| [751e334aa91bcba596c77d7cd3b78e7c5f93ef44] | committer: Andreas Rheinhardt
avformat/ttaenc: Avoid stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=751e334aa91bcba596c77d7cd3b78e7c5f93ef44
---
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);
}
}
More information about the ffmpeg-cvslog
mailing list