[vlc-commits] se/archive: react and issue diagnostic on reset-error

Filip Roséen git at videolan.org
Fri Mar 17 19:05:42 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Mar 17 11:25:18 2017 +0100| [da536f6857193d4127dd459a1bc0d10642190a6c] | committer: Jean-Baptiste Kempf

se/archive: react and issue diagnostic on reset-error

Hi Hugo,

On 2017-03-17 10:54, Hugo Beauzée-Luyssen wrote:

> 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(-)

> > +            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?

I actually meant to not have that assignment to `p_sys->b_dead` at
all, seems like I did the rebasing a little fast and ended up with a
`fixup` where it should have been a `drop`.

I also just noticed that there is one patch missing from this set. See
attached patch for an updated one, and expect another one being sent
to `vlc-devel` really soon.

> >                  return VLC_EGENERIC;
> > +            }
> >
> >              i_skip = i_req;
> >              i_offset = 0;
>
> 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

Seems your message got truncated, but see earlier paragraph.

Thanks for the review, and happy friday!

Best Regards,\
Filip Roséen

>From d98e615592ca7ebb61af6dab98d4c66ee2831207 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Filip=20Ros=C3=A9en?= <filip at atch.se>
Date: Fri, 17 Mar 2017 11:21:18 +0100
Subject: [PATCH] se/archive: issue diagnostic on reset failure

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da536f6857193d4127dd459a1bc0d10642190a6c
---

 modules/stream_extractor/archive.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 88af35a..7a4e5e1 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -604,11 +604,12 @@ 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, "unable to recreate libarchive handle" );
                 return VLC_EGENERIC;
+            }
 
             i_skip = i_req;
             i_offset = 0;



More information about the vlc-commits mailing list