Log an error when PushSample fails

Change-Id: I7911881a42af0edac10b36ad82158e103418714a
This commit is contained in:
KongQun Yang 2016-02-24 11:47:05 -08:00
parent 0d3951ff74
commit a01b07fbfd
1 changed files with 4 additions and 1 deletions

View File

@ -160,7 +160,10 @@ bool Demuxer::PushSample(uint32_t track_id,
std::vector<MediaStream*>::iterator it = streams_.begin(); std::vector<MediaStream*>::iterator it = streams_.begin();
for (; it != streams_.end(); ++it) { for (; it != streams_.end(); ++it) {
if (track_id == (*it)->info()->track_id()) { 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."; LOG(ERROR) << "Track " << track_id << " not found.";