diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2015-11-10 18:45:08 +0100 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2015-11-10 18:45:08 +0100 |
commit | 273607c1c6f77859e9a0cb98c3e4c74bc354fd8d (patch) | |
tree | 0fbd329857356bddf1d4dfbcf09ca4fbe2d6f0f9 /audio/decode/ad_spdif.c | |
parent | 5b7d0fbab31cb70d05bb7f757283c1ee4028b091 (diff) | |
parent | fee45c01703ace0d6af7b8fe60d151be245a0e3f (diff) | |
download | mpv-273607c1c6f77859e9a0cb98c3e4c74bc354fd8d.tar.bz2 mpv-273607c1c6f77859e9a0cb98c3e4c74bc354fd8d.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'audio/decode/ad_spdif.c')
-rw-r--r-- | audio/decode/ad_spdif.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/audio/decode/ad_spdif.c b/audio/decode/ad_spdif.c index 88f3f2ba2b..5e9dcf1c4f 100644 --- a/audio/decode/ad_spdif.c +++ b/audio/decode/ad_spdif.c @@ -253,13 +253,11 @@ static int decode_packet(struct dec_audio *da, struct mp_audio **out) if (!mpkt) return AD_EOF; + double pts = mpkt->pts; + AVPacket pkt; mp_set_av_packet(&pkt, mpkt, NULL); pkt.pts = pkt.dts = 0; - if (mpkt->pts != MP_NOPTS_VALUE) { - da->pts = mpkt->pts; - da->pts_offset = 0; - } if (!spdif_ctx->lavf_ctx) { if (init_filter(da, &pkt) < 0) return AD_ERR; @@ -276,6 +274,7 @@ static int decode_packet(struct dec_audio *da, struct mp_audio **out) return AD_ERR; memcpy((*out)->planes[0], spdif_ctx->out_buffer, spdif_ctx->out_buffer_len); + (*out)->pts = pts; return 0; } |