X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmlpdec.c;h=6f2ba5d87450bfb267cc0065240545975c385226;hb=29f5c1e51b0d156f4650b96ab56c07727fe9a9b7;hp=d82df219d997c33767467d4da20c75dad3c9ecab;hpb=de33b3e457a656230fc6d544a1889218d77a5b3c;p=ffmpeg diff --git a/libavformat/mlpdec.c b/libavformat/mlpdec.c index d82df219d99..6f2ba5d8745 100644 --- a/libavformat/mlpdec.c +++ b/libavformat/mlpdec.c @@ -25,7 +25,7 @@ #include "rawdec.h" #include "libavutil/intreadwrite.h" -static int av_always_inline mlp_thd_probe(AVProbeData *p, uint32_t sync) +static int av_always_inline mlp_thd_probe(const AVProbeData *p, uint32_t sync) { const uint8_t *buf, *last_buf = p->buf, *end = p->buf + p->buf_size; int frames = 0, valid = 0, size = 0; @@ -51,12 +51,13 @@ static int av_always_inline mlp_thd_probe(AVProbeData *p, uint32_t sync) } #if CONFIG_MLP_DEMUXER -static int mlp_probe(AVProbeData *p) +static int mlp_probe(const AVProbeData *p) { return mlp_thd_probe(p, 0xf8726fbb); } -AVInputFormat ff_mlp_demuxer = { +FF_RAW_DEMUXER_CLASS(mlp) +const AVInputFormat ff_mlp_demuxer = { .name = "mlp", .long_name = NULL_IF_CONFIG_SMALL("raw MLP"), .read_probe = mlp_probe, @@ -65,16 +66,19 @@ AVInputFormat ff_mlp_demuxer = { .flags = AVFMT_GENERIC_INDEX | AVFMT_NOTIMESTAMPS, .extensions = "mlp", .raw_codec_id = AV_CODEC_ID_MLP, + .priv_data_size = sizeof(FFRawDemuxerContext), + .priv_class = &mlp_demuxer_class, }; #endif #if CONFIG_TRUEHD_DEMUXER -static int thd_probe(AVProbeData *p) +static int thd_probe(const AVProbeData *p) { return mlp_thd_probe(p, 0xf8726fba); } -AVInputFormat ff_truehd_demuxer = { +FF_RAW_DEMUXER_CLASS(truehd) +const AVInputFormat ff_truehd_demuxer = { .name = "truehd", .long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"), .read_probe = thd_probe, @@ -83,6 +87,8 @@ AVInputFormat ff_truehd_demuxer = { .flags = AVFMT_GENERIC_INDEX | AVFMT_NOTIMESTAMPS, .extensions = "thd", .raw_codec_id = AV_CODEC_ID_TRUEHD, + .priv_data_size = sizeof(FFRawDemuxerContext), + .priv_class = &truehd_demuxer_class, }; #endif