Skip to content

Commit

Permalink
fix(hlsstream): don't send error when seek pos= duration
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Aug 14, 2020
1 parent e520ebe commit e996d96
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/demuxer/play_list/HLSStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,12 @@ namespace Cicada {
AF_LOGE("(%d)getSegmentNumberByTime error us is %lld\n", mPTracker->getStreamType(),
us);

if (us == mPTracker->getDuration()) {
mIsEOS = true;
mPTracker->setCurSegNum(mPTracker->getLastSegNum());
return 0;
}

if (mPTracker->getStreamType() == STREAM_TYPE_SUB) {
mIsEOS = false;
mError = 0;
Expand All @@ -1229,7 +1235,6 @@ namespace Cicada {
mThreadPtr->start();
}
}

return -1;
}

Expand Down

0 comments on commit e996d96

Please sign in to comment.