Skip to content

Commit

Permalink
fix(HLSStream): reopen demuxer on read after stop
Browse files Browse the repository at this point in the history
Signed-off-by: pingkai <pingkai010@gmail.com>
  • Loading branch information
pingkai committed Feb 24, 2020
1 parent 68afe48 commit f4a636b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/demuxer/play_list/HLSStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace Cicada {

int64_t HLSStream::seekSegment(off_t offset, int whence)
{
int ret;
int64_t ret;

if (mSegDecrypter == nullptr) {
if (mExtDataSource) {
Expand Down Expand Up @@ -901,7 +901,7 @@ namespace Cicada {
AF_LOGW("mPDemuxer->readPacket FRAMEWORK_ERR_EXIT\n");
}

if (mStopOnSegEnd) {
if (ret == 0 && mStopOnSegEnd) {
mIsEOS = true;
AF_LOGE("mStopOnSegEnd");
return -EAGAIN;
Expand Down Expand Up @@ -1142,6 +1142,8 @@ namespace Cicada {
delete mSegKeySource;
mSegKeySource = nullptr;
}

mIsOpened_internal = false;
}
clearDataFrames();
AF_LOGD("%s\n", __func__);
Expand Down

0 comments on commit f4a636b

Please sign in to comment.