Decoders have previously not used AVFrame.pts, and with the upcoming deprecation of pkt_pts (in favor of pts), this would lead to an errorneous interpration of timestamps.
Unified · Split
| @@ -2108,12 +2108,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 2107 unmodified lines | |||
| 2108 | } | 2108 | } |
| 2109 | } | 2109 | } |
| 2110 | 2110 | ||
| 2111 | /* if the decoder provides a pts, use it instead of the last packet pts. | 2111 | if (decoded_frame->pkt_pts != AV_NOPTS_VALUE) { |
| 2112 | the decoder could be delaying output by a packet or more. */ | ||
| 2113 | if (decoded_frame->pts != AV_NOPTS_VALUE) { | ||
| 2114 | ist->dts = ist->next_dts = ist->pts = ist->next_pts = av_rescale_q(decoded_frame->pts, avctx->time_base, AV_TIME_BASE_Q); | ||
| 2115 | decoded_frame_tb = avctx->time_base; | ||
| 2116 | } else if (decoded_frame->pkt_pts != AV_NOPTS_VALUE) { | ||
| 2117 | decoded_frame->pts = decoded_frame->pkt_pts; | 2112 | decoded_frame->pts = decoded_frame->pkt_pts; |
| 2118 | decoded_frame_tb = ist->st->time_base; | 2113 | decoded_frame_tb = ist->st->time_base; |
| 2119 | } else if (pkt && pkt->pts != AV_NOPTS_VALUE) { | 2114 | } else if (pkt && pkt->pts != AV_NOPTS_VALUE) { |