提交 a069e0ac 编写于 作者: X Xinzheng Zhang

ff_ffplay: merge:6f74e3cde6147b9a9bda5071e505e9ffbb99096a

	Merge commit 'beb62dac629603eb074a44c44389c230b5caac7c'
	* commit 'beb62dac629603eb074a44c44389c230b5caac7c':
          Use AVFrame.pts instead of deprecated pkt_pts.
Merged-by: NHendrik Leppkes <h.leppkes@gmail.com>
上级 5ca01afb
......@@ -400,9 +400,7 @@ static int decoder_decode_frame(FFPlayer *ffp, Decoder *d, AVFrame *frame, AVSub
ffp->stat.vdps = SDL_SpeedSamplerAdd(&ffp->vdps_sampler, FFP_SHOW_VDPS_AVCODEC, "vdps[avcodec]");
if (ffp->decoder_reorder_pts == -1) {
frame->pts = av_frame_get_best_effort_timestamp(frame);
} else if (ffp->decoder_reorder_pts) {
frame->pts = frame->pkt_pts;
} else {
} else if (!ffp->decoder_reorder_pts) {
frame->pts = frame->pkt_dts;
}
}
......@@ -413,9 +411,7 @@ static int decoder_decode_frame(FFPlayer *ffp, Decoder *d, AVFrame *frame, AVSub
if (got_frame) {
AVRational tb = (AVRational){1, frame->sample_rate};
if (frame->pts != AV_NOPTS_VALUE)
frame->pts = av_rescale_q(frame->pts, d->avctx->time_base, tb);
else if (frame->pkt_pts != AV_NOPTS_VALUE)
frame->pts = av_rescale_q(frame->pkt_pts, av_codec_get_pkt_timebase(d->avctx), tb);
frame->pts = av_rescale_q(frame->pts, av_codec_get_pkt_timebase(d->avctx), tb);
else if (d->next_pts != AV_NOPTS_VALUE)
frame->pts = av_rescale_q(d->next_pts, d->next_pts_tb, tb);
if (frame->pts != AV_NOPTS_VALUE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册