Skip to content

Commit

Permalink
fix(subtitleDemuxer): set current to begin at first get subtitle packet
Browse files Browse the repository at this point in the history
  • Loading branch information
I-m-SuperMan authored and kongjianneu committed Sep 28, 2020
1 parent 344ef27 commit cde8f98
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions framework/demuxer/avFormatSubtitleDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ namespace Cicada {
mSeekPTS = INT64_MIN;
}

if (mCurrent == mPacketMap.end()) {
return 0;
}

if (mCurrentPts == INT64_MIN) {
mCurrent = mPacketMap.begin();
mCurrentPts = (*(mCurrent)).second->getInfo().pts;
Expand All @@ -192,6 +188,8 @@ namespace Cicada {
packet = ((*(mCurrent)).second->clone());
mCurrentPts = packet->getInfo().pts;
mCurrent++;
} else {
return 0;
}

return static_cast<int>(packet->getSize());
Expand Down

0 comments on commit cde8f98

Please sign in to comment.