Skip to content

Commit

Permalink
ff_ffplay: merge:6f74e3cde6147b9a9bda5071e505e9ffbb99096a
Browse files Browse the repository at this point in the history
	Merge commit 'beb62dac629603eb074a44c44389c230b5caac7c'
	* commit 'beb62dac629603eb074a44c44389c230b5caac7c':
          Use AVFrame.pts instead of deprecated pkt_pts.

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
  • Loading branch information
xinzhengzhang committed Nov 4, 2016
1 parent 5ca01af commit a069e0a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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) {
Expand Down

0 comments on commit a069e0a

Please sign in to comment.