summaryrefslogtreecommitdiffstats
path: root/mp_core.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-13 19:27:01 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-13 19:46:02 +0200
commita4ce95de811698503075a5f0b513e595f11f97a4 (patch)
tree20785a9ff28439b08fb22993e25954731937bc25 /mp_core.h
parent642ce15ef770dd5dbea7c7ee16cbf45f6e86feae (diff)
downloadmpv-a4ce95de811698503075a5f0b513e595f11f97a4.tar.bz2
mpv-a4ce95de811698503075a5f0b513e595f11f97a4.tar.xz
core: do initial A-V sync by modifying audio stream
Add code to enforce matching pts with video when (re)starting the audio stream, by either cutting away the first samples or inserting silence at the beginning. New option -noinitial-audio-sync can be used to disable this and return to old behavior.
Diffstat (limited to 'mp_core.h')
-rw-r--r--mp_core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/mp_core.h b/mp_core.h
index ed90f4377b..206cbdacd3 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -125,6 +125,10 @@ typedef struct MPContext {
/* We're starting playback from scratch or after a seek. Show first
* video frame immediately and reinitialize sync. */
bool restart_playback;
+ /* After playback restart (above) or audio stream change, adjust audio
+ * stream by cutting samples or adding silence at the beginning to make
+ * audio playback position match video position. */
+ bool syncing_audio;
// AV sync: the next frame should be shown when the audio out has this
// much (in seconds) buffered data left. Increased when more data is
// written to the ao, decreased when moving to the next frame.