diff options
author | James Almer <jamrial@gmail.com> | 2018-08-05 21:34:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-08-07 18:42:35 -0300 |
commit | b955a33314d4707f3c90c75d7c319d2020ec111a (patch) | |
tree | 60a80f34251699612b7e16abdd46c18606aba501 | |
parent | f563e7868fb9540e1c8a589558fba2beaaba01e0 (diff) | |
download | ffmpeg-b955a33314d4707f3c90c75d7c319d2020ec111a.tar.gz |
ffmpeg: simplify refcounting packets for the muxing queue
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r-- | fftools/ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 55faec8ede..2459374f08 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -724,11 +724,11 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u if (ret < 0) exit_program(1); } - ret = av_packet_ref(&tmp_pkt, pkt); + ret = av_packet_make_refcounted(pkt); if (ret < 0) exit_program(1); + av_packet_move_ref(&tmp_pkt, pkt); av_fifo_generic_write(ost->muxing_queue, &tmp_pkt, sizeof(tmp_pkt), NULL); - av_packet_unref(pkt); return; } |