do not exit avthread too early

if video stream has only 1 frame we should keep it displaying
This commit is contained in:
wang-bin
2014-05-27 18:35:29 +08:00
parent fba31cb386
commit db8605a3e1
+1 -4
View File
@@ -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);
}