aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-01 02:41:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-01 02:41:26 +0200
commitec837a08993d4272eb0e8687fe90025c2b9638ac (patch)
tree594b266e8a30a326a8c77fc033cb3df8f14dc4e1
parenta6e46ed51ab947cfd25ab8f0b99772ea11ad5bac (diff)
parent02fc61a5a68321acb9d84bf30580cbdb3a2db1d6 (diff)
downloadffmpeg-ec837a08993d4272eb0e8687fe90025c2b9638ac.tar.gz
Merge remote-tracking branch 'cus/stable'
* cus/stable: ffplay: always send zero packets to flush audio decoders ffplay: use frame->pkt_pts instead of pkt->pts in audio pts calculation Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffplay.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ffplay.c b/ffplay.c
index 946e9b3a30..744570c08a 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);
@@ -2892,8 +2892,7 @@ static int read_thread(void *arg)
pkt->stream_index = is->video_stream;
packet_queue_put(&is->videoq, pkt);
}
- if (is->audio_stream >= 0 &&
- is->audio_st->codec->codec->capabilities & CODEC_CAP_DELAY) {
+ if (is->audio_stream >= 0) {
av_init_packet(pkt);
pkt->data = NULL;
pkt->size = 0;