1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-27 09:32:40 +00:00
mpv/demux
wm4 65d8709152 demux_lavf: add terrible hack to make DVD playback just work
DVD playback had some trouble with PTS resets: libavformat's genpts
feature would try reading until EOF (worst case) to find a new usable
PTS in case a packet's PTS is not set correctly. Especially with slow
DVD access, this would make the player to appear frozen.

Reimplement it partially in demux_lavf.c, and use that code in the DVD
case. This is heavily "inspired" by the code in av_read_frame from
libavformat/utils.c. The difference is that we stop reading if no PTS
has been found after 50 packets (consider this a heuristic). Also, we
don't bother with the PTS wrapping and last-frame-before-EOF handling.
Even with normal PTS wraps, the player frontend will go to hell for the
duration of a frame anyway, and should recover quickly after that.

The terribleness of this commit is mostly that we duplicate libavformat
functionality, and that we suddenly need a packet queue.
2013-07-14 23:44:50 +02:00
..
codec_tags.c demux: fix big endian PCM in mkv with demux_mkv 2013-05-11 20:19:08 +02:00
codec_tags.h core: redo how codecs are mapped, remove codecs.conf 2013-02-10 17:25:56 +01:00
demux_cue.c demux: remove useless author/comment fields 2013-07-12 22:16:27 +02:00
demux_edl.c demux: remove useless author/comment fields 2013-07-12 22:16:27 +02:00
demux_lavf.c demux_lavf: add terrible hack to make DVD playback just work 2013-07-14 23:44:50 +02:00
demux_libass.c demux: remove useless author/comment fields 2013-07-12 22:16:27 +02:00
demux_mf.c demux: assume correct-pts mode by default 2013-07-12 22:16:27 +02:00
demux_mkv.c demux_mkv: remove weird i_bps calculation code 2013-07-12 23:35:26 +02:00
demux_mng.c demux: make claiming accurate seek the default 2013-07-12 22:29:34 +02:00
demux_packet.h demux: workaround for -demuxer mpegts -correct-pts 2013-05-21 22:07:13 +02:00
demux_raw.c demux_raw: uncrustify 2013-07-14 17:55:54 +02:00
demux_subreader.c demux: make claiming accurate seek the default 2013-07-12 22:29:34 +02:00
demux.c demux: make claiming accurate seek the default 2013-07-12 22:29:34 +02:00
demux.h demux: assume correct-pts mode by default 2013-07-12 22:16:27 +02:00
ebml.c stream: fix some aspects of EOF handling 2013-06-16 22:05:10 +02:00
ebml.h demux_mkv: use a bounded buffer for block data 2013-04-20 23:28:22 +02:00
matroska.h demux_mkv: support dirac in mkv 2013-05-21 22:07:12 +02:00
mf.c demux_mf: fix crashes when '*' matches directories 2013-03-19 01:54:45 +01:00
mf.h demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
ms_hdr.h ms_hdr: remove unused definitions 2013-07-10 02:00:47 +02:00
stheader.h stheader: minor cleanup 2013-07-11 19:35:09 +02:00