History

ffmpeg: remove unused and errorneous AVFrame timestamp check

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.

Hendrik Leppkes committed 10 years ago

Commit 04a35771 parent 02128671 file · +1 −6Browse files

Unified · Split

ffmpeg.c+1−6
@@ -2108,12 +2108,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 2107 unmodified lines
21082108 }
21092109 }
21102110
2111− /* if the decoder provides a pts, use it instead of the last packet pts.
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) {
2111+ if (decoded_frame->pkt_pts != AV_NOPTS_VALUE) {
21172112 decoded_frame->pts = decoded_frame->pkt_pts;
21182113 decoded_frame_tb = ist->st->time_base;
21192114 } else if (pkt && pkt->pts != AV_NOPTS_VALUE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t