diff options
author | wm4 <wm4@nowhere> | 2015-03-10 15:17:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-10 15:17:57 +0100 |
commit | da46a13c6b50417df1edd5e0768aeb9880c537db (patch) | |
tree | 357150d4d7d69c17164dbc9d1ca4c5094842b6bf /audio/format.c | |
parent | 5f8b060ec2dde7d0ff5468a5b7499851c22b756d (diff) | |
download | mpv-da46a13c6b50417df1edd5e0768aeb9880c537db.tar.bz2 mpv-da46a13c6b50417df1edd5e0768aeb9880c537db.tar.xz |
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.
Diffstat (limited to 'audio/format.c')
0 files changed, 0 insertions, 0 deletions