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 }, };