diff --git a/tsMuxer/programStreamDemuxer.cpp b/tsMuxer/programStreamDemuxer.cpp index d10bf0bc..f480ae44 100644 --- a/tsMuxer/programStreamDemuxer.cpp +++ b/tsMuxer/programStreamDemuxer.cpp @@ -288,7 +288,8 @@ int ProgramStreamDemuxer::simpleDemuxBlock(DemuxedData& demuxedData, const PIDSe const uint8_t* payloadData = curBuf + pesPacket->getHeaderLength() + afterPesHeader; const int pesPayloadLen = pesPacket->getPacketLength() - pesPacket->getHeaderLength() - afterPesHeader; const int copyLen = FFMIN(pesPayloadLen, (int)(end - payloadData)); - if (copyLen < 0) { + if (copyLen < 0) + { THROW(ERR_COMMON, "Invalid copyLen") } vect.append(payloadData, copyLen);