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
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) {

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