1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #151, always reap ts whatever audio or video packet. 0.9.223.

This commit is contained in:
winlin 2014-10-08 15:15:57 +08:00
parent 13b092704d
commit 9789335d0b
6 changed files with 22 additions and 20 deletions

View file

@ -400,7 +400,7 @@ int SrsGopCache::cache(SrsSharedPtrMessage* msg)
}
// no acceptable video or pure audio, disable the cache.
if (cached_video_count == 0) {
if (pure_audio()) {
srs_verbose("ignore any frame util got a h264 video frame.");
return ret;
}
@ -482,6 +482,11 @@ int64_t SrsGopCache::start_time()
return msg->header.timestamp;
}
bool SrsGopCache::pure_audio()
{
return cached_video_count == 0;
}
std::map<std::string, SrsSource*> SrsSource::pool;
int SrsSource::find(SrsRequest* req, SrsSource** ppsource)