summaryrefslogtreecommitdiff
path: root/libavformat/mp3enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-12-15 23:21:25 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-04 04:58:57 +0100
commit3485e79f07d74e47ff00b60a68d609d37d0129ba (patch)
treeadac3f5438c5d5637b5620e07d6742c50c286bdb /libavformat/mp3enc.c
parentf0fb005f59f6febcf2ffc8140bdb7f136ac56add (diff)
avformat/(aiff|flac|mov|mp3|tta)enc: Don't create unnecessary references
The packet given to muxers is not used afterwards; it is always unreferenced by libavformat. Ergo muxers are allowed to keep the references in the packets and e.g. move the ownership to a packet list. This is what this commit does. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mp3enc.c')
-rw-r--r--libavformat/mp3enc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index e4b2a65b07..5728ef30be 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -524,7 +524,8 @@ static int mp3_write_packet(AVFormatContext *s, AVPacket *pkt)
if (pkt->stream_index == mp3->audio_stream_idx) {
if (mp3->pics_to_write) {
/* buffer audio packets until we get all the pictures */
- int ret = avpriv_packet_list_put(&mp3->queue, &mp3->queue_end, pkt, av_packet_ref, 0);
+ int ret = avpriv_packet_list_put(&mp3->queue, &mp3->queue_end,
+ pkt, NULL, 0);
if (ret < 0) {
av_log(s, AV_LOG_WARNING, "Not enough memory to buffer audio. Skipping picture streams\n");