diff options
author | Andriy Gelman <andriy.gelman@gmail.com> | 2020-04-30 15:43:40 -0400 |
---|---|---|
committer | Andriy Gelman <andriy.gelman@gmail.com> | 2020-05-14 09:53:59 -0400 |
commit | 0776cb7083c34b4593c62f068f4371169f987e7b (patch) | |
tree | 17040749f1d9e384ddc9bb2c7e3e28dabff0fef5 /libavformat/mpegtsenc.c | |
parent | 1dd0def976405c38b80e89a385e3eaad98988358 (diff) | |
download | ffmpeg-0776cb7083c34b4593c62f068f4371169f987e7b.tar.gz |
avformat/mpegtsenc: Remove two duplicated fields
ts->{tsid,onid} stores the values of ts->{transport_stream_id,original_network_id}
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r-- | libavformat/mpegtsenc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 8ca1ddf003..bf1a7ee13f 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -79,8 +79,6 @@ typedef struct MpegTSWrite { int64_t sdt_period; /* SDT period in PCR time base */ int64_t pat_period; /* PAT/PMT period in PCR time base */ int nb_services; - int onid; - int tsid; int64_t first_pcr; int64_t next_pcr; int mux_rate; ///< set to 1 when VBR @@ -261,7 +259,7 @@ static void mpegts_write_pat(AVFormatContext *s) put16(&q, service->sid); put16(&q, 0xe000 | service->pmt.pid); } - mpegts_write_section1(&ts->pat, PAT_TID, ts->tsid, ts->tables_version, 0, 0, + mpegts_write_section1(&ts->pat, PAT_TID, ts->transport_stream_id, ts->tables_version, 0, 0, data, q - data); } @@ -731,7 +729,7 @@ static void mpegts_write_sdt(AVFormatContext *s) int i, running_status, free_ca_mode, val; q = data; - put16(&q, ts->onid); + put16(&q, ts->original_network_id); *q++ = 0xff; for (i = 0; i < ts->nb_services; i++) { service = ts->services[i]; @@ -757,7 +755,7 @@ static void mpegts_write_sdt(AVFormatContext *s) desc_list_len_ptr[0] = val >> 8; desc_list_len_ptr[1] = val; } - mpegts_write_section1(&ts->sdt, SDT_TID, ts->tsid, ts->tables_version, 0, 0, + mpegts_write_section1(&ts->sdt, SDT_TID, ts->transport_stream_id, ts->tables_version, 0, 0, data, q - data); } @@ -960,8 +958,6 @@ static int mpegts_init(AVFormatContext *s) // round up to a whole number of TS packets ts->pes_payload_size = (ts->pes_payload_size + 14 + 183) / 184 * 184 - 14; - ts->tsid = ts->transport_stream_id; - ts->onid = ts->original_network_id; if (!s->nb_programs) { /* allocate a single DVB service */ if (!mpegts_add_service(s, ts->service_id, s->metadata, NULL)) |