X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fwebvttdec.c;h=52579c5ed2ca1dec3108df5665b1fd33c3a45600;hb=1004a92cd44404ad55a75509cd289a70fa03d333;hp=0aeb8a63f489bc081f13f8a71e4022346ca1bea2;hpb=de33b3e457a656230fc6d544a1889218d77a5b3c;p=ffmpeg diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 0aeb8a63f48..52579c5ed2c 100644 --- a/libavformat/webvttdec.c +++ b/libavformat/webvttdec.c @@ -37,7 +37,7 @@ typedef struct { int kind; } WebVTTContext; -static int webvtt_probe(AVProbeData *p) +static int webvtt_probe(const AVProbeData *p) { const uint8_t *ptr = p->buf; @@ -192,14 +192,14 @@ static int webvtt_read_close(AVFormatContext *s) } #define OFFSET(x) offsetof(WebVTTContext, x) -#define KIND_FLAGS AV_OPT_FLAG_SUBTITLE_PARAM +#define KIND_FLAGS AV_OPT_FLAG_SUBTITLE_PARAM|AV_OPT_FLAG_DECODING_PARAM static const AVOption options[] = { { "kind", "Set kind of WebVTT track", OFFSET(kind), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, KIND_FLAGS, "webvtt_kind" }, - { "subtitles", "WebVTT subtitles kind", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, 0, "webvtt_kind" }, - { "captions", "WebVTT captions kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, INT_MIN, INT_MAX, 0, "webvtt_kind" }, - { "descriptions", "WebVTT descriptions kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, INT_MIN, INT_MAX, 0, "webvtt_kind" }, - { "metadata", "WebVTT metadata kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, INT_MIN, INT_MAX, 0, "webvtt_kind" }, + { "subtitles", "WebVTT subtitles kind", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, KIND_FLAGS, "webvtt_kind" }, + { "captions", "WebVTT captions kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_CAPTIONS }, INT_MIN, INT_MAX, KIND_FLAGS, "webvtt_kind" }, + { "descriptions", "WebVTT descriptions kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_DESCRIPTIONS }, INT_MIN, INT_MAX, KIND_FLAGS, "webvtt_kind" }, + { "metadata", "WebVTT metadata kind", 0, AV_OPT_TYPE_CONST, { .i64 = AV_DISPOSITION_METADATA }, INT_MIN, INT_MAX, KIND_FLAGS, "webvtt_kind" }, { NULL } };