You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/dvbsubdec: simplify code by using OFFSET() macro
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
This commit is contained in:
@@ -1730,10 +1730,11 @@ end:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define DS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_SUBTITLE_PARAM
|
#define DS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_SUBTITLE_PARAM
|
||||||
|
#define OFFSET(x) offsetof(DVBSubContext, x)
|
||||||
static const AVOption options[] = {
|
static const AVOption options[] = {
|
||||||
{"compute_edt", "compute end of time using pts or timeout", offsetof(DVBSubContext, compute_edt), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DS},
|
{"compute_edt", "compute end of time using pts or timeout", OFFSET(compute_edt), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DS},
|
||||||
{"compute_clut", "compute clut when not available(-1) or always(1) or never(0)", offsetof(DVBSubContext, compute_clut), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, DS},
|
{"compute_clut", "compute clut when not available(-1) or always(1) or never(0)", OFFSET(compute_clut), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, DS},
|
||||||
{"dvb_substream", "", offsetof(DVBSubContext, substream), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, DS},
|
{"dvb_substream", "", OFFSET(substream), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, DS},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
static const AVClass dvbsubdec_class = {
|
static const AVClass dvbsubdec_class = {
|
||||||
|
Reference in New Issue
Block a user