summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-09-09 16:28:51 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-09-15 16:14:33 +0200
commit2939e258f9d1fff89b3b68536beb931b54611585 (patch)
tree86888a4d1e6a3a2be0edf5db37a7ee109868a121
parent6d8b32633e843962d84fc63875bda909d9a36f46 (diff)
downloadffmpeg-streaming-2939e258f9d1fff89b3b68536beb931b54611585.zip
ffmpeg-streaming-2939e258f9d1fff89b3b68536beb931b54611585.tar.gz
ffplay: use PTS from the AVSubtitle structure.
-rw-r--r--ffplay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 42f03b8..1c9a141 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1840,8 +1840,9 @@ static int subtitle_thread(void *arg)
avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
&got_subtitle, pkt);
-
if (got_subtitle && sp->sub.format == 0) {
+ if (sp->sub.pts != AV_NOPTS_VALUE)
+ pts = sp->sub.pts / (double)AV_TIME_BASE;
sp->pts = pts;
for (i = 0; i < sp->sub.num_rects; i++)
OpenPOWER on IntegriCloud