[vlc-commits] [Git][videolan/vlc][master] demux: mp4: remove unneeded loop

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 25 13:12:24 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
412e7f0c by Steve Lhomme at 2025-09-25T12:58:33+00:00
demux: mp4: remove unneeded loop

The loop exits on the first iterator no matter what since 5cd17d1723bd653be81f420ab4ece49383f5e15d.

- - - - -


1 changed file:

- modules/demux/mp4/minibox.h


Changes:

=====================================
modules/demux/mp4/minibox.h
=====================================
@@ -36,7 +36,7 @@ static void mp4_box_iterator_Init( mp4_box_iterator_t *p_it,
 
 static bool mp4_box_iterator_Next( mp4_box_iterator_t *p_it )
 {
-    while( p_it->i_buffer > 8 )
+    if( p_it->i_buffer > 8 )
     {
         const uint8_t *p = p_it->p_buffer;
         const size_t i_size = GetDWBE( p );
@@ -50,7 +50,6 @@ static bool mp4_box_iterator_Next( mp4_box_iterator_t *p_it )
             p_it->i_buffer -= i_size;
             return true;
         }
-        else break;
     }
     return false;
 }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/412e7f0c963ef6c3e288712a72801ed7b8fd577e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/412e7f0c963ef6c3e288712a72801ed7b8fd577e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list