summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-08-17 12:03:50 -0300
committerJames Almer <jamrial@gmail.com>2020-09-15 09:53:39 -0300
commit8a81820624ada4d339aeb2150ad5c2b36b12860c (patch)
treee282bffaec65e0cd54c523b5e88610ad4f901b5f /libavformat/matroskadec.c
parentfda5363c80bd09066d69fb9bd365c9114b8d08f3 (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/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index b1ef344aa7..545559423c 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -48,6 +48,7 @@
#include "libavcodec/bytestream.h"
#include "libavcodec/flac.h"
#include "libavcodec/mpeg4audio.h"
+#include "libavcodec/packet_internal.h"
#include "avformat.h"
#include "avio_internal.h"
@@ -2991,7 +2992,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska,
MatroskaTrack *tracks = matroska->tracks.elem;
MatroskaTrack *track;
- ff_packet_list_get(&matroska->queue, &matroska->queue_end, pkt);
+ avpriv_packet_list_get(&matroska->queue, &matroska->queue_end, pkt);
track = &tracks[pkt->stream_index];
if (track->has_palette) {
uint8_t *pal = av_packet_new_side_data(pkt, AV_PKT_DATA_PALETTE, AVPALETTE_SIZE);
@@ -3013,7 +3014,7 @@ static int matroska_deliver_packet(MatroskaDemuxContext *matroska,
*/
static void matroska_clear_queue(MatroskaDemuxContext *matroska)
{
- ff_packet_list_free(&matroska->queue, &matroska->queue_end);
+ avpriv_packet_list_free(&matroska->queue, &matroska->queue_end);
}
static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
@@ -3179,7 +3180,7 @@ static int matroska_parse_rm_audio(MatroskaDemuxContext *matroska,
track->audio.buf_timecode = AV_NOPTS_VALUE;
pkt->pos = pos;
pkt->stream_index = st->index;
- ret = ff_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, 0);
+ ret = avpriv_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, NULL, 0);
if (ret < 0) {
av_packet_unref(pkt);
return AVERROR(ENOMEM);
@@ -3401,7 +3402,7 @@ static int matroska_parse_webvtt(MatroskaDemuxContext *matroska,
pkt->duration = duration;
pkt->pos = pos;
- err = ff_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, 0);
+ err = avpriv_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, NULL, 0);
if (err < 0) {
av_packet_unref(pkt);
return AVERROR(ENOMEM);
@@ -3512,7 +3513,7 @@ FF_DISABLE_DEPRECATION_WARNINGS
FF_ENABLE_DEPRECATION_WARNINGS
#endif
- res = ff_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, 0);
+ res = avpriv_packet_list_put(&matroska->queue, &matroska->queue_end, pkt, NULL, 0);
if (res < 0) {
av_packet_unref(pkt);
return AVERROR(ENOMEM);