Fix VideoPlayer from stop after just few frames
This commit is contained in:
@@ -53,6 +53,12 @@ public:
|
||||
BOOL seek(int pos);
|
||||
int64 getElapse() {return m_nCurPos;};
|
||||
int64 getDuration() {return m_nDuration;}
|
||||
// Set inside readFrame() when av_read_frame returns AVERROR_EOF and the
|
||||
// reader auto-loops via av_seek_frame. Caller (ANSVideoPlayer) polls this
|
||||
// to detect EOF without relying on m_nCurPos, which is non-monotonic
|
||||
// (decode-order packet PTS + audio thread also writes to it).
|
||||
BOOL hasLooped() {return m_bLooped;}
|
||||
void clearLooped() {m_bLooped = FALSE;}
|
||||
int getVideoCodec();
|
||||
int getAudioCodec();
|
||||
BOOL onRecord();
|
||||
@@ -79,7 +85,8 @@ private:
|
||||
int m_bSeek; // seek request
|
||||
double m_dSeekPos; // seek position, nit is millisecond
|
||||
int m_nNalLength;
|
||||
|
||||
BOOL m_bLooped; // set by readFrame() when EOF triggered an av_seek_frame back to start
|
||||
|
||||
AVFormatContext * m_pFormatContext; // format context
|
||||
|
||||
pthread_t m_hReadThread; // read thread
|
||||
|
||||
Reference in New Issue
Block a user