[vlc-devel] [PATCH 3/5] vout_subpictures: move decl and compare original stop value

Steve Lhomme robux4 at ycbcr.xyz
Mon Jan 6 08:16:00 CET 2020


The commit log doesn't seem to match the code change, which just adds a 
const to a local variable.

On 2020-01-03 15:15, Francois Cartegnie wrote:
> prevents broken comparison if timestamp conversion fails
> ---
>   src/video_output/vout_subpictures.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
> index b278b11268..1092b17593 100644
> --- a/src/video_output/vout_subpictures.c
> +++ b/src/video_output/vout_subpictures.c
> @@ -687,7 +687,6 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
>           for (size_t index = 0; index < channel->entries.size; index++) {
>               spu_render_entry_t *render_entry = &channel->entries.data[index];
>               subpicture_t *current = render_entry->subpic;
> -            bool is_stop_valid;
>   
>               if (!spu_render_entry_IsSelected(render_entry, channel->id,
>                                                system_now, render_subtitle_date,
> @@ -704,8 +703,9 @@ spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now,
>                       *ephemer_order_ptr = current->i_order;
>               }
>   
> -            is_stop_valid = !current->b_ephemer || render_entry->stop > render_entry->start;
> -
> +            /* If the spu is ephemer, the stop time is invalid, but it has been converted to
> +               system time and used in comparisons below */
> +            const bool is_stop_valid = !current->b_ephemer || render_entry->orgstop > render_entry->orgstart;
>               render_entry->is_late = is_stop_valid && current->i_stop <= render_date;
>   
>               /* start_date will be used for correct automatic overlap support
> -- 
> 2.21.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list