MCPcopy Create free account
hub / github.com/apache/brpc / AddPadding

Method AddPadding

src/brpc/ts.cpp:347–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347void TsPacket::AddPadding(size_t num_stuffings) {
348 const bool no_af_before = (_adaptation_field == NULL);
349 TsAdaptationField* af = mutable_adaptation_field();
350 if (no_af_before) {
351 const size_t sz = af->ByteSize();
352 if (num_stuffings > sz) {
353 af->nb_af_reserved = num_stuffings - sz;
354 }
355 } else {
356 af->nb_af_reserved += num_stuffings;
357 }
358}
359
360void TsPacket::CreateAsPAT(int16_t pmt_number, TsPid pmt_pid) {
361 if (_modified) {

Callers 1

EncodePESMethod · 0.80

Calls 1

ByteSizeMethod · 0.45

Tested by

no test coverage detected