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 @@ -1106,6 +1106,9 @@ I P P P I P P P I P P I P P I P
11061106*/
11071107bool SingleStreamDecoder::canWeAvoidSeeking () const {
11081108 const StreamInfo& streamInfo = streamInfos_.at (activeStreamIndex_);
1109+ if (!cursorWasJustSet_) {
1110+ return true ;
1111+ }
11091112 if (streamInfo.avMediaType == AVMEDIA_TYPE_AUDIO) {
11101113 // For audio, we only need to seek if a backwards seek was requested
11111114 // within getFramesPlayedInRangeAudio(), when setCursorPtsInSeconds() was
@@ -1187,10 +1190,8 @@ UniqueAVFrame SingleStreamDecoder::decodeAVFrame(
11871190
11881191 resetDecodeStats ();
11891192
1190- if (cursorWasJustSet_) {
1191- maybeSeekToBeforeDesiredPts ();
1192- cursorWasJustSet_ = false ;
1193- }
1193+ maybeSeekToBeforeDesiredPts ();
1194+ cursorWasJustSet_ = false ;
11941195
11951196 UniqueAVFrame avFrame (av_frame_alloc ());
11961197 AutoAVPacket autoAVPacket;
You can’t perform that action at this time.
0 commit comments