No longer attempt to parse RAW tracks in MPEG-TS, just ignore instead

This commit is contained in:
Thulinma 2021-05-25 15:12:04 +02:00
parent 4743769c15
commit c2b205e119

View file

@ -266,6 +266,8 @@ namespace TS{
std::string reg = desc.getRegistration(); std::string reg = desc.getRegistration();
if (reg == "Opus"){ if (reg == "Opus"){
pidToCodec[pid] = OPUS; pidToCodec[pid] = OPUS;
}else{
pidToCodec.erase(pid);
} }
} }
} break; } break;
@ -457,8 +459,8 @@ namespace TS{
// Check for large enough buffer // Check for large enough buffer
if ((paySize - offset) < 9 || (paySize - offset) < 9 + pesHeader[8]){ if ((paySize - offset) < 9 || (paySize - offset) < 9 + pesHeader[8]){
INFO_MSG("Not enough data on track %zu (%d / %d), discarding remainder of data", tid, INFO_MSG("Not enough data (%d / %d) on track %zu (%" PRIu32 "), discarding remainder of data",
paySize - offset, 9 + pesHeader[8]); paySize - offset, 9 + pesHeader[8], tid, pidToCodec[tid]);
break; break;
} }