[vlc-commits] oggseek: simplify the loop exit
    Steve Lhomme 
    git at videolan.org
       
    Wed Sep 19 13:23:51 CEST 2018
    
    
  
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu May 31 16:34:45 2018 +0200| [ec1bd168c12bbc0773ea5af16b1f4b0479589434] | committer: Steve Lhomme
oggseek: simplify the loop exit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec1bd168c12bbc0773ea5af16b1f4b0479589434
---
 modules/demux/oggseek.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/demux/oggseek.c b/modules/demux/oggseek.c
index 6fcb029dea..ae3d67f97d 100644
--- a/modules/demux/oggseek.c
+++ b/modules/demux/oggseek.c
@@ -285,16 +285,16 @@ void Oggseek_ProbeEnd( demux_t *p_demux )
                     i_length = Ogg_GranuleToTime( p_sys->pp_stream[i], i_granule,
                                                   !p_sys->pp_stream[i]->b_contiguous, false );
                     if( i_length != VLC_TICK_INVALID )
+                    {
+                        /* We found at least a page with valid granule */
                         p_sys->i_length = __MAX( p_sys->i_length, SEC_FROM_VLC_TICK(i_length - VLC_TICK_0) );
+                        goto clean;
+                    }
                     break;
                 }
             }
-            if ( i_length != VLC_TICK_INVALID ) break;
         }
 
-        /* We found at least a page with valid granule */
-        if ( i_length != VLC_TICK_INVALID ) break;
-
         /* Otherwise increase read size, starting earlier */
         if ( i_backoffset <= ( UINT_MAX >> 1 ) )
         {
    
    
More information about the vlc-commits
mailing list