1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

ffmpeg: simplify refcounting packets for the muxing queue

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2018-08-05 21:34:14 -03:00
parent f563e7868f
commit b955a33314

View File

@@ -724,11 +724,11 @@ static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost, int u
if (ret < 0) if (ret < 0)
exit_program(1); exit_program(1);
} }
ret = av_packet_ref(&tmp_pkt, pkt); ret = av_packet_make_refcounted(pkt);
if (ret < 0) if (ret < 0)
exit_program(1); exit_program(1);
av_packet_move_ref(&tmp_pkt, pkt);
av_fifo_generic_write(ost->muxing_queue, &tmp_pkt, sizeof(tmp_pkt), NULL); av_fifo_generic_write(ost->muxing_queue, &tmp_pkt, sizeof(tmp_pkt), NULL);
av_packet_unref(pkt);
return; return;
} }