[vlc-commits] remove AnyAnnexB helper

Francois Cartegnie git at videolan.org
Thu Apr 12 10:45:57 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 12 06:38:38 2018 +0200| [d1631827dc81bcb25c0c231b2b017a517e341b8f] | committer: Francois Cartegnie

remove AnyAnnexB helper

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

 modules/packetizer/hxxx_nal.h         |  4 ++--
 modules/packetizer/startcode_helper.h | 17 -----------------
 2 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/modules/packetizer/hxxx_nal.h b/modules/packetizer/hxxx_nal.h
index 6ba41ae3f0..89f563ffc8 100644
--- a/modules/packetizer/hxxx_nal.h
+++ b/modules/packetizer/hxxx_nal.h
@@ -299,11 +299,11 @@ static inline bool hxxx_annexb_iterate_next( hxxx_iterator_ctx_t *p_ctx, const u
     if( !p_ctx->p_head )
         return false;
 
-    p_ctx->p_head = startcode_FindAnyAnnexB( p_ctx->p_head, p_ctx->p_tail );
+    p_ctx->p_head = startcode_FindAnnexB( p_ctx->p_head, p_ctx->p_tail );
     if( !p_ctx->p_head )
         return false;
 
-    const uint8_t *p_end = startcode_FindAnyAnnexB( p_ctx->p_head + 3, p_ctx->p_tail );
+    const uint8_t *p_end = startcode_FindAnnexB( p_ctx->p_head + 3, p_ctx->p_tail );
     if( !p_end )
         p_end = p_ctx->p_tail;
 
diff --git a/modules/packetizer/startcode_helper.h b/modules/packetizer/startcode_helper.h
index 136c384247..ea70ec5b28 100644
--- a/modules/packetizer/startcode_helper.h
+++ b/modules/packetizer/startcode_helper.h
@@ -143,23 +143,6 @@ static inline const uint8_t * startcode_FindAnnexB( const uint8_t *p, const uint
     return NULL;
 }
 
-/* Special variation to return on prefix only and no data */
-static inline const uint8_t * startcode_FindAnyAnnexB( const uint8_t *p, const uint8_t *end )
-{
-    size_t i_size = end - p;
-    if( i_size <= 4 )
-    {
-        if( i_size == 4 )
-        {
-            TRY_MATCH(p, 0);
-        }
-        else  if ( i_size == 3 && p[0] == 0 && p[1] == 0 && p[2] == 1 )
-             return p;
-        return NULL;
-    }
-    else return startcode_FindAnnexB( p, end );
-}
-
 #undef TRY_MATCH
 
 #endif



More information about the vlc-commits mailing list