summaryrefslogtreecommitdiff
path: root/libavformat/takdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-06-07 19:49:20 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-07-08 16:03:17 +0200
commit779dba0fc0f16cf4ddceba0b6527301889b58ccf (patch)
tree9a3ea2d1cb442f436507cfdb1e97a2f164c8e1c1 /libavformat/takdec.c
parentcd564ee547de3ffee1764e9c3bbc055556af2482 (diff)
avformat/flacdec, takdec: Use FFRawDemuxerContext directly
The beginning of the private contexts of both the FLAC and the TAK demuxer currently mimick FFRawDemuxerContext: A pointer to an AVClass followed by the AVOpt-enabled field raw_packet_size. Said field is only used by the demuxers' read_packet functions via ff_raw_read_partial_packet(), which treats the private context as an FFRaawDemuxerContext. Yet this is fragile, so better include a FFRawDemuxerContext struct at the beginning of said demuxers' private contexts. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/takdec.c')
-rw-r--r--libavformat/takdec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index cbb9a9345e..cf400ec04b 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -31,8 +31,7 @@
#include "rawdec.h"
typedef struct TAKDemuxContext {
- AVClass *class;
- int raw_packet_size;
+ FFRawDemuxerContext rawctx;
int mlast_frame;
int64_t data_end;
} TAKDemuxContext;