File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1100,6 +1100,9 @@ I P P P I P P P I P P I P P I P
11001100*/
11011101bool SingleStreamDecoder::canWeAvoidSeeking () const {
11021102 const StreamInfo& streamInfo = streamInfos_.at (activeStreamIndex_);
1103+ if (!cursorWasJustSet_) {
1104+ return true ;
1105+ }
11031106 if (streamInfo.avMediaType == AVMEDIA_TYPE_AUDIO) {
11041107 // For audio, we only need to seek if a backwards seek was requested
11051108 // within getFramesPlayedInRangeAudio(), when setCursorPtsInSeconds() was
@@ -1181,10 +1184,8 @@ UniqueAVFrame SingleStreamDecoder::decodeAVFrame(
11811184
11821185 resetDecodeStats ();
11831186
1184- if (cursorWasJustSet_) {
1185- maybeSeekToBeforeDesiredPts ();
1186- cursorWasJustSet_ = false ;
1187- }
1187+ maybeSeekToBeforeDesiredPts ();
1188+ cursorWasJustSet_ = false ;
11881189
11891190 UniqueAVFrame avFrame (av_frame_alloc ());
11901191 AutoAVPacket autoAVPacket;
You can’t perform that action at this time.
0 commit comments