[FFmpeg-devel] [PATCH 5/6] ffplay: use PTS from the AVSubtitle structure.
Philip Langdale
philipl at overt.org
Sun Sep 9 23:23:37 CEST 2012
On 09.09.2012 07:50, Nicolas George wrote:
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> ffplay.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>
> This patch fixes trac ticket #1722 in the case when the file is
> played using
> ffplay.
>
>
> diff --git a/ffplay.c b/ffplay.c
> index 2a07be1..d56bee9 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -1839,6 +1839,8 @@ static int subtitle_thread(void *arg)
>
> avcodec_decode_subtitle2(is->subtitle_st->codec, &sp->sub,
> &got_subtitle, pkt);
> + if (sp->sub.pts != AV_NOPTS_VALUE)
> + pts = sp->sub.pts / (double)AV_TIME_BASE;
>
> if (got_subtitle && sp->sub.format == 0) {
> sp->pts = pts;
LGTM.
--phil
More information about the ffmpeg-devel
mailing list