1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 18:12:22 +00:00
mpv/demux
wm4 5114c69c7f demux: change hack for closing subtitle files early
Subtitles (and a few other file types, like playlists) are not streamed,
but fully read on opening. This means keeping the file handle or network
socket open is a waste of resources and could cause other weird
behavior. This is why there's a hack to close them after opening.

Change this hack to make the demuxer itself do this, which is less
weird. (Until recently, demuxer->stream ownership was more complex,
which is why it was done this way.)

There is some evil shit due to a huge ownership/lifetime mess of various
objects. Especially EDL (the currently only nested demuxer case)
requires being careful about mp_cancel and passing down stream pointers.

As one defensive programming measure, stop accessing the "stream"
variable in open_given_type(), even where it would still work. This
includes removing a redundant line of code, and removing the peak call,
which should not be needed anymore, as the remaining demuxers do this
mostly correctly.
2019-09-19 20:37:04 +02:00
..
codec_tags.c codec_tags: fix wrong buffer size 2019-07-03 17:47:24 +03:00
codec_tags.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
cue.c demux: support cue sheets longer than 100 minutes 2019-04-01 23:39:08 +02:00
cue.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
demux_cue.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux_edl.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux_lavf.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux_libarchive.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux_mf.c demux: return packets directly from demuxer instead of using sh_stream 2019-09-19 20:37:04 +02:00
demux_mkv_timeline.c demux_mkv: copy attachments (fonts) from ordered chapter sources 2019-06-12 23:34:47 +03:00
demux_mkv.c demux: return packets directly from demuxer instead of using sh_stream 2019-09-19 20:37:04 +02:00
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux_raw.c demux: return packets directly from demuxer instead of using sh_stream 2019-09-19 20:37:04 +02:00
demux_timeline.c demux_timeline: fix off by one error, rearrange weird code 2019-09-19 20:37:04 +02:00
demux.c demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
demux.h demux: change hack for closing subtitle files early 2019-09-19 20:37:04 +02:00
ebml.c demux_mkv: adjust log verbosity levels 2018-04-29 02:21:32 +03:00
ebml.h demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
matroska.h ebml, matroska.h: change license to LGPL 2017-04-21 13:34:10 +02:00
packet.c demux/packet: fix demux_packet_shorten 2018-09-30 12:32:03 +03:00
packet.h demux: return packets directly from demuxer instead of using sh_stream 2019-09-19 20:37:04 +02:00
stheader.h player: expose hearing/visual impaired flags on audio tracks 2018-08-13 19:09:44 +02:00
timeline.c demux: get rid of free_demuxer[_and_stream]() 2018-05-24 19:56:35 +02:00
timeline.h ytdl_hook, edl: implement pseudo-DASH support 2017-02-04 22:34:38 +01:00