player: do not drop trailing packets
This commit is contained in:
parent
ee46a189a6
commit
82b7345944
1 changed files with 1 additions and 2 deletions
|
@ -58,7 +58,6 @@ namespace Player{
|
|||
char buff[1024 * 10];
|
||||
if (fileSrc.good()){
|
||||
fileSrc.read(buff, sizeof(buff));
|
||||
if (fileSrc.eof()) return -1;
|
||||
buffer.append(buff, fileSrc.gcount());
|
||||
return fileSrc.gcount();
|
||||
}
|
||||
|
@ -177,7 +176,7 @@ seekDone:
|
|||
|
||||
void File::Play() {
|
||||
long long now, timeDiff = 0, lastTime = 0;
|
||||
while (fileSrc.good()) {
|
||||
while (fileSrc.good() || !inBuffer.empty()) {
|
||||
if (readCommand()) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue