1
mirror of https://github.com/mpv-player/mpv synced 2024-11-07 01:47:00 +01:00
mpv/player
wm4 da46a13c6b audio: cut audio with spdif too on playback restart
When playback is started after seeking or opening a file, we need to
make sure audio and video line up exactly. This is done by cutting or
padding the audio stream to start on the video PTS.

This does not quite work with spdif: audio is compressed data, within a
spdif frame. There is no way to cut the audio "in between" the frames.
Cutting between the frames would just produce broken spdif packets, and
who knows how receivers will react to this (play noise?). But we still
can cut it in frame boundaries.

Unfortunately, we also insert 0 data for "silence" - we probably
shouldn't do this. Chances are the receiver will switch to PCM or so.
But for now this will have to do.

Note that this could be simplified somewhat, as soon as we work with
frames. See previous commit.
2015-03-10 15:17:57 +01:00
..
lua Lua: add unpack shim for Lua 5.2/5.3 compatibility. 2015-03-06 12:28:20 +01:00
audio.c audio: cut audio with spdif too on playback restart 2015-03-10 15:17:57 +01:00
client.c player, client API: refactor cplayer init, reduce client API differences 2015-03-05 11:22:15 +01:00
client.h vo_opengl_cb: simplify API uninitialization 2014-12-31 20:31:19 +01:00
command.c command: add display-fps property 2015-03-10 14:50:56 +01:00
command.h player: fix audio-device-list updates 2015-02-14 15:13:58 +01:00
configfiles.c sub: mess with styling defaults, change --ass-use-margins behavior 2015-02-16 20:04:29 +01:00
core.h player, client API: refactor cplayer init, reduce client API differences 2015-03-05 11:22:15 +01:00
discnav.c osc, dvd, bd: fix mouse state when changing menu modes 2014-12-05 16:04:04 +01:00
loadfile.c player: refine rar:// playlist-safety handling 2015-03-02 19:09:36 +01:00
lua.c Lua: add mp.get_screen_margins(). 2015-03-01 13:08:39 +01:00
main_fn.c cocoa: fix build by using the correct HAVE_* macro 2014-08-06 09:31:59 +02:00
main.c player: restore --dump-stats 2015-03-10 09:50:32 +01:00
misc.c player: cosmetics: async/non-blocking -> reentrant 2015-02-20 20:06:43 +01:00
osd.c command: improve A-B loop behavior 2014-11-18 20:28:54 +01:00
playloop.c player: use symbolic constant for seek precision 2015-03-04 17:31:36 +01:00
screenshot.c options: list correct default value for --screenshot-template 2015-01-26 11:38:23 +01:00
screenshot.h Move mpvcore/player/ to player/ 2013-12-17 00:53:22 +01:00
scripting.c scripting: fix/improve deprecation message 2014-12-15 06:24:05 +01:00
sub.c build: fix warnings with --disable-libass 2015-03-04 17:28:36 +01:00
video.c player: use symbolic constant for seek precision 2015-03-04 17:31:36 +01:00