summaryrefslogtreecommitdiffstats
path: root/stream/stream_file.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-13 16:22:57 +0200
committersfan5 <sfan5@live.de>2018-05-25 10:46:24 +0200
commit4e750e31a1a68f941a5e2ce53c30cdc5ac7a7ca2 (patch)
tree6a070f85af0ae140a9ca0ded68443bcc8ce4ae8b /stream/stream_file.c
parentdb03f01300f9d10de3dc0144302b07c6b7f1fd48 (diff)
downloadmpv-4e750e31a1a68f941a5e2ce53c30cdc5ac7a7ca2.tar.bz2
mpv-4e750e31a1a68f941a5e2ce53c30cdc5ac7a7ca2.tar.xz
demux: fix/improve aspects of EOF signaling
When the current packet queue was completely empty, and EOF was reached, the queue->is_eof flag was not correctly set to true. Change this by reading ds->eof to check whether the stream is considered EOF. We also need to make sure update_seek_ranges() is called in this case, so change the code to simply call it when queue->is_eof changes. Also, read_packet() needs to call adjust_seek_range_on_packet() if ds->eof changes. In that case, the decoder also needs to be notified about EOF. So both of these should be called when ds->eof changes to true. (Other code outside of this function deals with the case when ds->eof is changed to false.) In addition, this code was kind of shoddy about calling wakeup_ds() correctly. It looks like there was an inverted condition, and sent a wakeup to the decoder only when ds->eof was already true, which is obviously bogus. The final EOF case tried to be somehow clever about checking in->last_eof for notifying the codec, which is sort of OK, but seems to be strictly worse than just checking whether ds->eof changed. Fix these things.
Diffstat (limited to 'stream/stream_file.c')
0 files changed, 0 insertions, 0 deletions