From a01b07fbfdb8504650476d3e9b83be53d0e095ac Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Wed, 24 Feb 2016 11:47:05 -0800 Subject: [PATCH] Log an error when PushSample fails Change-Id: I7911881a42af0edac10b36ad82158e103418714a --- packager/media/base/demuxer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packager/media/base/demuxer.cc b/packager/media/base/demuxer.cc index 81f018eeac..1514076dc0 100644 --- a/packager/media/base/demuxer.cc +++ b/packager/media/base/demuxer.cc @@ -160,7 +160,10 @@ bool Demuxer::PushSample(uint32_t track_id, std::vector::iterator it = streams_.begin(); for (; it != streams_.end(); ++it) { if (track_id == (*it)->info()->track_id()) { - return (*it)->PushSample(sample).ok(); + Status status = (*it)->PushSample(sample); + if (!status.ok()) + LOG(ERROR) << "Demuxer::PushSample failed with " << status; + return status.ok(); } } LOG(ERROR) << "Track " << track_id << " not found.";