[FFmpeg-devel] [PATCH] ffplay: remove empty subtitles from que head

Marton Balint cus at passwd.hu
Sat Jul 12 15:44:55 CEST 2014



On Sat, 12 Jul 2014, Michael Niedermayer wrote:

> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> ffplay.c |    1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ffplay.c b/ffplay.c
> index 7e954fd..6572c42 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -1446,6 +1446,7 @@ retry:
>                             sp2 = NULL;
>
>                         if (sp->serial != is->subtitleq.serial
> +                                || !sp->sub.num_rects
>                                 || (is->vidclk.pts > (sp->pts + ((float) sp->sub.end_display_time / 1000)))
>                                 || (sp2 && is->vidclk.pts > (sp2->pts + ((float) sp2->sub.start_display_time / 1000))))
>                         {

I don't think this patch is needed. If the subpicture queue is empty, it 
does not matter. If it is not empty then checking sp2 pts in the last 
condition is enough to remove the empty subtitle (sp) from the queue, if 
sp2 has the same pts as sp.

Regards,
Marton


More information about the ffmpeg-devel mailing list