From 072e037023143945baf12ebe7f97452a47b5dc4e Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 2 Sep 2020 00:00:32 +0200 Subject: [PATCH] Fixed H264 analyser --- src/analysers/analyser_h264.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/analysers/analyser_h264.cpp b/src/analysers/analyser_h264.cpp index 595ce5f9..aee5173f 100644 --- a/src/analysers/analyser_h264.cpp +++ b/src/analysers/analyser_h264.cpp @@ -43,14 +43,12 @@ bool AnalyserH264::parsePacket(){ if (detail >= 2){nalPtr->toPrettyString(std::cout);} dataBuffer.erase(0, size); // erase the NAL unit we just read prePos += size; + return true; } ///\TODO update mediaTime with current timestamp }while (nalPtr); - if (!nalPtr){ - FAIL_MSG("Could not read a NAL unit at position %" PRIu64, prePos); - return false; - } - return true; + FAIL_MSG("Could not read a NAL unit at position %" PRIu64, prePos); + return false; } uint64_t AnalyserH264::neededBytes(){