[vlc-devel] [PATCH] stream_filter: adf: require .adf extension

Jean-Baptiste Kempf jb at videolan.org
Thu Oct 27 08:11:29 CEST 2016


Missing is_forced, no? 

On Wed, 26 Oct 2016, at 22:23, Tristan Matthews wrote:
> This should avoid some false positives.
> ---
>  modules/stream_filter/adf.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/modules/stream_filter/adf.c b/modules/stream_filter/adf.c
> index d3e2476..5e742f8 100644
> --- a/modules/stream_filter/adf.c
> +++ b/modules/stream_filter/adf.c
> @@ -69,6 +69,13 @@ static int Open( vlc_object_t *p_object )
>  {
>      stream_t *p_stream = (stream_t *)p_object;
>  
> +    /* Require .adf extension */
> +    if( !p_stream->psz_url )
> +        return VLC_EGENERIC;
> +    const char *psz_ext = strrchr( p_stream->psz_url, '.' );
> +    if( !psz_ext || strncmp( psz_ext, ".adf", 4 ) )
> +        return VLC_EGENERIC;
> +
>      const uint8_t *peek;
>      if( vlc_stream_Peek( p_stream->p_source, &peek, 3 ) < 3 )
>          return VLC_EGENERIC;
> -- 
> 2.9.3
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
  Jean-Baptiste Kempf
  jb at videolan.org


More information about the vlc-devel mailing list