From d4ec970a795dec643130af7fe766fbbb5bd101c0 Mon Sep 17 00:00:00 2001 From: "henrik.lundin" Date: Tue, 6 Sep 2016 01:22:45 -0700 Subject: [PATCH] neteq_rtpplay: Add an error message for unmatched SSRC If neteq_rtpplay is invoked with the --ssrc option to select packets matching a specific SSRC, but no matching packets are found, this CL provides a meaningful error message. BUG=webrtc:2692 NOTRY=True TBR=ivoc@webrtc.org Review-Url: https://codereview.webrtc.org/2318503002 Cr-Commit-Position: refs/heads/master@{#14083} --- webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc index ff4b68bfb5..f22459332a 100644 --- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc +++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc @@ -15,6 +15,7 @@ #include // For strtoul. #include +#include #include #include #include @@ -245,6 +246,8 @@ class FilterSsrcInput : public NetEqInput { FilterSsrcInput(std::unique_ptr source, uint32_t ssrc) : source_(std::move(source)), ssrc_(ssrc) { FindNextWithCorrectSsrc(); + RTC_CHECK(source_->NextHeader()) << "Found no packet with SSRC = 0x" + << std::hex << ssrc_; } // All methods but PopPacket() simply relay to the |source_| object.