summaryrefslogtreecommitdiff
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-02-19 11:22:21 -0300
committerJames Almer <jamrial@gmail.com>2024-02-19 11:25:21 -0300
commit4b8be3616dd41422eae0230967df2701a0b57714 (patch)
treedfd790039bd7556cd45ab55c18466ca0c70b32df /libavformat/mpegts.c
parentf9f56fdc3763bf0a0f0a2d12c55af7c4b9aad9a6 (diff)
avformat/mpegts: remove decoding param from ts_packetsize option
It's a read only exported option, and not meant to be set by the user. Also, move it to MPEGTS_OPTIONS while at it to avoid duplication. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index b2c7365519..836d5dd5a3 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -191,14 +191,15 @@ struct MpegTSContext {
{ .i64 = MAX_RESYNC_SIZE}, 0, INT_MAX, AV_OPT_FLAG_DECODING_PARAM }, \
{ "ts_id", "transport stream id", \
offsetof(MpegTSContext, id), AV_OPT_TYPE_INT, \
+ { .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }, \
+ { "ts_packetsize", "output option carrying the raw packet size", \
+ offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT, \
{ .i64 = 0 }, 0, INT_MAX, AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY }
static const AVOption options[] = {
MPEGTS_OPTIONS,
{"fix_teletext_pts", "try to fix pts values of dvb teletext streams", offsetof(MpegTSContext, fix_teletext_pts), AV_OPT_TYPE_BOOL,
{.i64 = 1}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
- {"ts_packetsize", "output option carrying the raw packet size", offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
- {.i64 = 0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
{"scan_all_pmts", "scan and combine all PMTs", offsetof(MpegTSContext, scan_all_pmts), AV_OPT_TYPE_BOOL,
{.i64 = -1}, -1, 1, AV_OPT_FLAG_DECODING_PARAM },
{"skip_unknown_pmt", "skip PMTs for programs not advertised in the PAT", offsetof(MpegTSContext, skip_unknown_pmt), AV_OPT_TYPE_BOOL,
@@ -226,10 +227,6 @@ static const AVOption raw_options[] = {
{ "compute_pcr", "compute exact PCR for each transport stream packet",
offsetof(MpegTSContext, mpeg2ts_compute_pcr), AV_OPT_TYPE_BOOL,
{ .i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
- { "ts_packetsize", "output option carrying the raw packet size",
- offsetof(MpegTSContext, raw_packet_size), AV_OPT_TYPE_INT,
- { .i64 = 0 }, 0, 0,
- AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
{ NULL },
};