From f6d1b18b3d58cd8f06eea653c4a6e22e4b9245e6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 6 Jul 2019 11:32:48 +0200 Subject: avformat/rawdec: Make the raw packet size configurable This allows testing parsers with a wider range of input packet sizes. Which is important and usefull for regression testing, some of our parsers in fact to not work if the packet size is changed from 1024 Signed-off-by: Michael Niedermayer --- libavformat/takdec.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavformat/takdec.c') diff --git a/libavformat/takdec.c b/libavformat/takdec.c index 5e0601806f..6d18b6af21 100644 --- a/libavformat/takdec.c +++ b/libavformat/takdec.c @@ -31,6 +31,8 @@ #include "rawdec.h" typedef struct TAKDemuxContext { + AVClass *class; + int raw_packet_size; int mlast_frame; int64_t data_end; } TAKDemuxContext; @@ -211,6 +213,7 @@ static int raw_read_packet(AVFormatContext *s, AVPacket *pkt) return ret; } +FF_RAW_DEMUXER_CLASS(tak) AVInputFormat ff_tak_demuxer = { .name = "tak", .long_name = NULL_IF_CONFIG_SMALL("raw TAK"), @@ -221,4 +224,5 @@ AVInputFormat ff_tak_demuxer = { .flags = AVFMT_GENERIC_INDEX, .extensions = "tak", .raw_codec_id = AV_CODEC_ID_TAK, + .priv_class = &tak_demuxer_class, }; -- cgit v1.2.3