[vlc-devel] [vlc-commits] demux: timestamps_filter: change discontinuity detection trigger

Steve Lhomme robux4 at ycbcr.xyz
Wed Jan 29 08:54:17 CET 2020


On 2020-01-28 20:39, Francois Cartegnie wrote:
> vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jan 27 18:42:30 2020 +0100| [4ca4fa19e7df620b5cae33f8fb8f231e67a2c5ed] | committer: Francois Cartegnie
> 
> demux: timestamps_filter: change discontinuity detection trigger
> 
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ca4fa19e7df620b5cae33f8fb8f231e67a2c5ed
> ---
> 
>   modules/demux/timestamps_filter.h | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/modules/demux/timestamps_filter.h b/modules/demux/timestamps_filter.h
> index 5fc6b9326b..f56c4e7137 100644
> --- a/modules/demux/timestamps_filter.h
> +++ b/modules/demux/timestamps_filter.h
> @@ -95,7 +95,11 @@ static bool timestamps_filter_push(const char *s, struct timestamps_filter_s *tf
>   
>           if(b_contiguous)
>           {
> -            const int64_t i_maxdiff = tf->mva.i_packet > MVA_PACKETS ? mva_get(&tf->mva) * 2 : CLOCK_FREQ;
> +            int64_t i_maxdiff = 0;
> +            if(tf->mva.i_packet > MVA_PACKETS)
> +                i_maxdiff = mva_get(&tf->mva) * 2;
> +            if(i_maxdiff < CLOCK_FREQ)
> +                i_maxdiff = CLOCK_FREQ;

Is this meant to mean 1 second ? If so it should be using 
VLC_TICK_FROM_SEC(1) and use vlc_tick_t instead of int64_t.

>               if(llabs(i_dts - prev->dts) > i_maxdiff || b_discontinuity) /* Desync */
>               {
>                   prev->diff = mva_get(&tf->mva);
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
> 


More information about the vlc-devel mailing list