mirror of https://git.ffmpeg.org/ffmpeg.git
ffplay: use PTS from the AVSubtitle structure.
This commit is contained in:
parent
6d8b32633e
commit
2939e258f9
3
ffplay.c
3
ffplay.c
|
@ -1840,8 +1840,9 @@ static int subtitle_thread(void *arg)
|
||||||
|
|
||||||
avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
|
avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
|
||||||
&got_subtitle, pkt);
|
&got_subtitle, pkt);
|
||||||
|
|
||||||
if (got_subtitle && sp->sub.format == 0) {
|
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;
|
sp->pts = pts;
|
||||||
|
|
||||||
for (i = 0; i < sp->sub.num_rects; i++)
|
for (i = 0; i < sp->sub.num_rects; i++)
|
||||||
|
|
Loading…
Reference in New Issue