[vlc-devel] [PATCH] dvdnav cannot be trusted to open regular files (fix #4741)

Juha Jeronen juha.jeronen at jyu.fi
Sat May 7 18:39:40 CEST 2011


Hi,

On 05/07/2011 11:54 AM, Rémi Denis-Courmont wrote:
> ---
>  modules/access/dvdnav.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
> index c85378b..47348e4 100644
> --- a/modules/access/dvdnav.c
> +++ b/modules/access/dvdnav.c
> @@ -1475,6 +1475,7 @@ static int ProbeDVD( const char *psz_name )
>          goto bailout;
>      }
>  #endif
> +#if 0
>      /* Try to find the anchor (2 bytes at LBA 256) */
>      uint16_t anchor;
>  
> @@ -1482,7 +1483,7 @@ static int ProbeDVD( const char *psz_name )
>       && read( fd, &anchor, 2 ) == 2
>       && GetWLE( &anchor ) == 2 )
>          ret = VLC_SUCCESS; /* Found a potential anchor */
> -
> +#endif
>  bailout:
>      close( fd );
>      return ret;

This breaks support for DVD disc images (which I suppose is the whole
point of having dvdnav check regular files).

It seems that the original bug (
https://trac.videolan.org/vlc/ticket/4741 ) doesn't occur either in all
environments or for all local files. In my case, the old code (without
this patch) opens DVDs, DVD images and regular video files correctly. (I
haven't tried audio files.)

 -J




More information about the vlc-devel mailing list