File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -921,6 +921,11 @@ std::shared_ptr<Frame> FFmpegReader::ReadStream(int64_t requested_frame) {
921921 continue ;
922922 }
923923
924+ // Packet may become NULL on Close inside Seek if CheckSeek returns false
925+ if (!packet)
926+ // Jump to the next iteration of this loop
927+ continue ;
928+
924929 // Get the AVFrame from the current packet
925930 frame_finished = GetAVFrame ();
926931
@@ -957,6 +962,11 @@ std::shared_ptr<Frame> FFmpegReader::ReadStream(int64_t requested_frame) {
957962 continue ;
958963 }
959964
965+ // Packet may become NULL on Close inside Seek if CheckSeek returns false
966+ if (!packet)
967+ // Jump to the next iteration of this loop
968+ continue ;
969+
960970 // Update PTS / Frame Offset (if any)
961971 UpdatePTSOffset (false );
962972
You can’t perform that action at this time.
0 commit comments