0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
mpv/demux
wm4 848546f2de 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.
2014-07-18 15:08:38 +02:00
..
codec_tags.c demux: add "BIKb" FourCC 2014-04-08 22:59:53 +02:00
codec_tags.h demux: remove gsh field from sh_audio/sh_video/sh_sub 2013-11-23 21:37:56 +01:00
demux_cue.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
demux_disc.c dvd, bd: fix A/V sync 2014-07-18 01:26:46 +02:00
demux_edl.c timeline: reject mplayer2 EDL files, change EDL header 2013-11-21 15:59:00 +01:00
demux_lavf.c demux_lavf: reverse rotation direction with new API 2014-07-17 00:30:03 +02:00
demux_libass.c demux_libass: change how external ASS subtitles are loaded 2014-03-15 22:17:51 +01:00
demux_mf.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
demux_mkv.c demux: minor simplification 2014-07-06 19:02:21 +02:00
demux_playlist.c build: include <strings.h> for strcasecmp() 2014-07-10 08:29:32 +02:00
demux_raw.c demux: minor simplification to internal API 2014-07-05 17:07:15 +02:00
demux_subreader.c demux: minor simplification to internal API 2014-07-05 17:07:15 +02:00
demux_tv.c demux: minor simplification 2014-07-06 19:02:21 +02:00
demux.c demux: fix problems with EOF 2014-07-18 15:08:38 +02:00
demux.h demux: add function to read packets asychronously 2014-07-18 15:08:31 +02:00
ebml.c demux: minor cleanups 2014-07-01 21:53:23 +02:00
ebml.h demux: minor cleanups 2014-07-01 21:53:23 +02:00
matroska.h demux_mkv: add S_DVBSUB 2014-06-17 22:44:27 +02:00
mf.c Audit and replace all ctype.h uses 2014-07-01 23:11:08 +02:00
mf.h demux: mp_msg conversions 2013-12-21 21:43:16 +01:00
ms_hdr.h demux: rename Windows symbols 2013-11-02 15:14:12 +01:00
packet.c Remove stream_pts stuff 2014-07-06 19:05:59 +02:00
packet.h Remove stream_pts stuff 2014-07-06 19:05:59 +02:00
stheader.h demux: add a demuxer thread 2014-07-16 23:25:56 +02:00