path: root/common/encode_lavc.h
diff options
authorwm4 <wm4@nowhere>2014-03-07 15:23:03 +0100
committerwm4 <wm4@nowhere>2014-03-07 15:23:03 +0100
commit74b7001500c0901b095986fafe7dca3e5c23c7f2 (patch)
treedaee66eb3955ff8bff726b916171a81a4bf0e451 /common/encode_lavc.h
parent4579d9ca58ee50dba6cb45e4f27e85f2ebbb8269 (diff)
encode: don't access ao->pts
This field will be moved out of the ao struct. The encoding code was basically using an invalid way of accessing this field. Since the AO will be moved into its own thread too and will do its own buffering, the AO and the playback core might not even agree which sample a PTS timestamp belongs to. Add some extrapolation code to handle this case.
Diffstat (limited to 'common/encode_lavc.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/common/encode_lavc.h b/common/encode_lavc.h
index 96fc17f1bb..deaf42b684 100644
--- a/common/encode_lavc.h
+++ b/common/encode_lavc.h
@@ -55,6 +55,9 @@ struct encode_lavc_context {
double audio_pts_offset;
double last_video_in_pts;
+ double last_audio_in_pts;
+ int64_t samples_since_last_pts;
// anti discontinuity mode
double next_in_pts;
double discontinuity_pts_offset;