Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-10-07 14:16:36 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2016-10-07 14:16:36 +0300
commit6f74e3cde6147b9a9bda5071e505e9ffbb99096a (patch)
treedda765f307f2c19b3af909b35e82b42236c58d46 /ffplay.c
parent3f9137c57d2344d7613f134128235c18edcede95 (diff)
parentbeb62dac629603eb074a44c44389c230b5caac7c (diff)
Merge commit 'beb62dac629603eb074a44c44389c230b5caac7c'
* commit 'beb62dac629603eb074a44c44389c230b5caac7c': Use AVFrame.pts instead of deprecated pkt_pts. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ffplay.c b/ffplay.c
index 6d43191455..79dc76889e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -588,9 +588,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
if (got_frame) {
if (decoder_reorder_pts == -1) {
frame->pts = av_frame_get_best_effort_timestamp(frame);
- } else if (decoder_reorder_pts) {
- frame->pts = frame->pkt_pts;
- } else {
+ } else if (!decoder_reorder_pts) {
frame->pts = frame->pkt_dts;
}
}
@@ -600,9 +598,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
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) {