summaryrefslogtreecommitdiffstats
path: root/Copyright
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-13 16:22:57 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commit9ceccd6fca553ec4f310685d02b1f088117cd9ba (patch)
tree9360effda3791b4bd7aba737013b795cde03d26d /Copyright
parent7428cc51496ca8e56600fdc4034b8f55720f09f9 (diff)
downloadmpv-9ceccd6fca553ec4f310685d02b1f088117cd9ba.tar.bz2
mpv-9ceccd6fca553ec4f310685d02b1f088117cd9ba.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 'Copyright')
0 files changed, 0 insertions, 0 deletions