[vlc-devel] [PATCH 1/2] demux: subtitle: set length after subtitle reorder
Thomas Guillem
thomas at gllm.fr
Mon Sep 24 11:10:49 CEST 2018
Why ?
On Thu, Sep 20, 2018, at 17:36, Zhao Zhili wrote:
> ---
> modules/demux/subtitle.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
> index 3b9836587a..4b7eeefd59 100644
> --- a/modules/demux/subtitle.c
> +++ b/modules/demux/subtitle.c
> @@ -676,12 +676,6 @@ static int Open ( vlc_object_t *p_this )
>
> msg_Dbg(p_demux, "loaded %zu subtitles", p_sys->subtitles.i_count );
>
> - /* Fix subtitle (order and time) *** */
> - p_sys->subtitles.i_current = 0;
> - p_sys->i_length = 0;
> - if( p_sys->subtitles.i_count > 0 )
> - p_sys->i_length = p_sys->subtitles.p_array[p_sys-
> >subtitles.i_count-1].i_stop;
> -
> /* *** add subtitle ES *** */
> if( p_sys->props.i_type == SUB_TYPE_SSA1 ||
> p_sys->props.i_type == SUB_TYPE_SSA2_4 ||
> @@ -698,6 +692,11 @@ static int Open ( vlc_object_t *p_this )
> else
> es_format_Init( &fmt, SPU_ES, VLC_CODEC_SUBT );
>
> + p_sys->subtitles.i_current = 0;
> + p_sys->i_length = 0;
> + if( p_sys->subtitles.i_count > 0 )
> + p_sys->i_length = p_sys->subtitles.p_array[p_sys-
> >subtitles.i_count-1].i_stop;
> +
> /* Stupid language detection in the filename */
> char * psz_language = get_language_from_filename( p_demux-
> >psz_filepath );
>
> --
> 2.19.0.rc1
>
>
>
> _______________________________________________
> 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