summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-06-29 12:44:47 +0200
committerMarton Balint <cus@passwd.hu>2013-07-01 00:24:03 +0200
commit447d2e31d167ebd6856c492f762a98aa56df8b58 (patch)
treedcb6842d6577dee7f6a05df8849cd9a6664530b5 /ffplay.c
parent84343dd9d3b8e19c95c0f641a9f97915efec0633 (diff)
ffplay: use frame->pkt_pts instead of pkt->pts in audio pts calculation
Fixes ticket #2717. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 946e9b3a30..37623a4548 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2177,8 +2177,8 @@ static int audio_decode_frame(VideoState *is)
tb = (AVRational){1, is->frame->sample_rate};
if (is->frame->pts != AV_NOPTS_VALUE)
is->frame->pts = av_rescale_q(is->frame->pts, dec->time_base, tb);
- if (is->frame->pts == AV_NOPTS_VALUE && pkt_temp->pts != AV_NOPTS_VALUE)
- is->frame->pts = av_rescale_q(pkt_temp->pts, is->audio_st->time_base, tb);
+ else if (is->frame->pkt_pts != AV_NOPTS_VALUE)
+ is->frame->pts = av_rescale_q(is->frame->pkt_pts, is->audio_st->time_base, tb);
if (pkt_temp->pts != AV_NOPTS_VALUE)
pkt_temp->pts += (double) is->frame->nb_samples / is->frame->sample_rate / av_q2d(is->audio_st->time_base);