From 8a81820624ada4d339aeb2150ad5c2b36b12860c Mon Sep 17 00:00:00 2001 From: James Almer Date: Mon, 17 Aug 2020 12:03:50 -0300 Subject: avcodec/packet: move AVPacketList definition and function helpers over from libavformat And replace the flags parameter with a function callback that can be used to copy the contents of the packet (e.g, av_packet_ref and av_packet_copy_props). Signed-off-by: James Almer --- libavformat/aiffenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libavformat/aiffenc.c') diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index 88c45df334..c4ffe9f6d0 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -23,6 +23,7 @@ #include "libavutil/intfloat.h" #include "libavutil/opt.h" +#include "libavcodec/packet_internal.h" #include "avformat.h" #include "internal.h" #include "aiff.h" @@ -220,8 +221,8 @@ static int aiff_write_packet(AVFormatContext *s, AVPacket *pkt) if (s->streams[pkt->stream_index]->nb_frames >= 1) return 0; - return ff_packet_list_put(&aiff->pict_list, &aiff->pict_list_end, - pkt, FF_PACKETLIST_FLAG_REF_PACKET); + return avpriv_packet_list_put(&aiff->pict_list, &aiff->pict_list_end, + pkt, av_packet_ref, 0); } return 0; @@ -272,7 +273,7 @@ static void aiff_deinit(AVFormatContext *s) { AIFFOutputContext *aiff = s->priv_data; - ff_packet_list_free(&aiff->pict_list, &aiff->pict_list_end); + avpriv_packet_list_free(&aiff->pict_list, &aiff->pict_list_end); } #define OFFSET(x) offsetof(AIFFOutputContext, x) -- cgit v1.2.1