mirror of
https://github.com/wang-bin/QtAV.git
synced 2026-10-28 19:16:48 +08:00
do not exit avthread too early
if video stream has only 1 frame we should keep it displaying
This commit is contained in:
@@ -301,10 +301,7 @@ void AVDemuxThread::run()
|
||||
video_thread->setDemuxEnded(true);
|
||||
all_end &= !video_thread->isRunning();
|
||||
}
|
||||
if (aqueue)
|
||||
aqueue->put(Packet());
|
||||
if (vqueue)
|
||||
vqueue->put(Packet());
|
||||
// flush packet will send when out the loop. now it's still playing. too early to flush, e.g. video stream has 1 frame and flush now
|
||||
if (!all_end) {
|
||||
cond.wait(&buffer_mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user