diff options
author | James Almer <jamrial@gmail.com> | 2020-08-17 12:03:50 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2020-09-15 09:53:39 -0300 |
commit | 8a81820624ada4d339aeb2150ad5c2b36b12860c (patch) | |
tree | e282bffaec65e0cd54c523b5e88610ad4f901b5f /libavformat/flacenc.c | |
parent | fda5363c80bd09066d69fb9bd365c9114b8d08f3 (diff) |
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 <jamrial@gmail.com>
Diffstat (limited to 'libavformat/flacenc.c')
-rw-r--r-- | libavformat/flacenc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index b947a3b067..6b8ce8d7ee 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -23,6 +23,7 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "libavcodec/flac.h" +#include "libavcodec/packet_internal.h" #include "avformat.h" #include "avio_internal.h" #include "flacenc.h" @@ -305,7 +306,7 @@ static int flac_queue_flush(AVFormatContext *s) write = 0; while (c->queue) { - ff_packet_list_get(&c->queue, &c->queue_end, &pkt); + avpriv_packet_list_get(&c->queue, &c->queue_end, &pkt); if (write && (ret = flac_write_audio_packet(s, &pkt)) < 0) write = 0; av_packet_unref(&pkt); @@ -345,7 +346,7 @@ static void flac_deinit(struct AVFormatContext *s) { FlacMuxerContext *c = s->priv_data; - ff_packet_list_free(&c->queue, &c->queue_end); + avpriv_packet_list_free(&c->queue, &c->queue_end); } static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt) @@ -356,7 +357,7 @@ static int flac_write_packet(struct AVFormatContext *s, AVPacket *pkt) if (pkt->stream_index == c->audio_stream_idx) { if (c->waiting_pics) { /* buffer audio packets until we get all the pictures */ - ret = ff_packet_list_put(&c->queue, &c->queue_end, pkt, FF_PACKETLIST_FLAG_REF_PACKET); + ret = avpriv_packet_list_put(&c->queue, &c->queue_end, pkt, av_packet_ref, 0); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Out of memory in packet queue; skipping attached pictures\n"); c->waiting_pics = 0; |