[vlc-devel] [PATCH 5/5] se/archive: react and issue diagnostic on reset-error

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Mar 17 10:54:55 CET 2017


On Fri, Mar 17, 2017, at 03:22 AM, Filip Roséen wrote:
> ---
>  modules/stream_extractor/archive.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/modules/stream_extractor/archive.c
> b/modules/stream_extractor/archive.c
> index 91f7deb68f..2cf26b787f 100644
> --- a/modules/stream_extractor/archive.c
> +++ b/modules/stream_extractor/archive.c
> @@ -604,11 +604,14 @@ static int Seek( stream_extractor_t* p_extractor,
> uint64_t i_req )
>              if( archive_clean( p_sys ) )
>                  return VLC_EGENERIC;
>  
> -            if( archive_init( p_sys, p_extractor->source ) )
> -                return VLC_EGENERIC;
> -
> -            if( archive_seek_subentry( p_sys, p_extractor->identifier )
> )
> +            if( archive_init( p_sys, p_extractor->source ) ||
> +                archive_seek_subentry( p_sys, p_extractor->identifier )
> )
> +            {
> +                msg_Err( p_extractor,
> +                        "fatal: unable to recreate libarchive handle" );
> +                p_sys->b_dead = false;

Don't you mean true?

>                  return VLC_EGENERIC;
> +            }
>  
>              i_skip = i_req;
>              i_offset = 0;
> -- 
> 2.12.0
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

And assuming you meant `true` doesn't this make patch 4 obsolete? As far
as I understand the only way of having a NULL p_entry is to have a
successful archive_clean call followed by a failing archive_init call,
however you 

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list