diff options
author | wm4 <wm4@nowhere> | 2014-07-18 15:08:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-18 15:08:38 +0200 |
commit | 848546f2de52b54f78077cb4ca968e089e3e010a (patch) | |
tree | e68d1b6f47aef94c13cc6f8c4f7eb9195b642313 /player/playloop.c | |
parent | 152a099c3a92a3bef1edcc531f2d3273fb92a8ac (diff) | |
download | mpv-848546f2de52b54f78077cb4ca968e089e3e010a.tar.bz2 mpv-848546f2de52b54f78077cb4ca968e089e3e010a.tar.xz |
demux: fix problems with EOF
It was easy to get into a wakeup feedback loop on EOF. The reason that
EOF is complicated is that we try to retry reading when EOF is reached,
in case the EOF state actually disappears (e.g. when watching a
currently downloaded file).
This feature is probably worthless, since in practice you have to do a
seek to "unstuck" it anyway, but since the old code also did this, we
want to keep this behavior for now.
Avoid the feedback loop by introducing another EOF flag (last_eof), that
contains the actual previous EOF state, and is not overwritten when
retrying reading. Wakeup is skipped if the EOF state didn't change.
Also, actually call the wakeup callback when EOF is detected.
The line that adds "ds->active = false;" actually does nothing, but in
theory it's cleaner.
Diffstat (limited to 'player/playloop.c')
0 files changed, 0 insertions, 0 deletions