diff options
author | wm4 <wm4@nowhere> | 2014-07-24 15:27:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-24 15:27:31 +0200 |
commit | 69eb0563339e99a83146d0252478b58e265cba04 (patch) | |
tree | 092ce8649dd0b7d6263171290601ac5084ee4581 /audio/decode/dec_audio.c | |
parent | fc28e4af4d77a2aa29857471f0de1dc38996cc20 (diff) | |
download | mpv-69eb0563339e99a83146d0252478b58e265cba04.tar.bz2 mpv-69eb0563339e99a83146d0252478b58e265cba04.tar.xz |
audio: fix timestamps
Accidentally broken in b6af44d3. For ad_lavc (and in general), the PTS
was not updated correctly when filtering only parts of audio frames,
and for ad_mpg123 and ad_spdif the PTS was additionally offset by the
frame size.
This could lead to incorrect time display, and possibly broken A/V sync.
Diffstat (limited to 'audio/decode/dec_audio.c')
-rw-r--r-- | audio/decode/dec_audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index a090f9a707..38044b4657 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -262,6 +262,7 @@ static int filter_n_bytes(struct dec_audio *da, struct mp_audio_buffer *outbuf, append.samples = copy; mp_audio_buffer_append(da->decode_buffer, &append); mp_audio_skip_samples(&da->decoded, copy); + da->pts_offset += copy; continue; } error = da->ad_driver->decode_packet(da); |