mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-18 22:55:12 +08:00
avformat/utils: ensure that all packets in AVPacketList are reference counted
This is done so that its data is really owned by the packet. This was already true for the current callers. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:

committed by
James Almer

parent
4f589d668e
commit
b6be2be765
@@ -460,6 +460,11 @@ int ff_packet_list_put(AVPacketList **packet_buffer,
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
ret = av_packet_make_refcounted(pkt);
|
||||
if (ret < 0) {
|
||||
av_free(pktl);
|
||||
return ret;
|
||||
}
|
||||
av_packet_move_ref(&pktl->pkt, pkt);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user