mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/ttaenc: Avoid stack packet
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
9b41fddf3e
commit
751e334aa9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user