[vlc-commits] remove AnyAnnexB helper

Francois Cartegnie git at videolan.org
Tue Apr 17 14:32:44 CEST 2018


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

remove AnyAnnexB helper

(cherry picked from commit d1631827dc81bcb25c0c231b2b017a517e341b8f)

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

 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 947733fa21..8c0f5ecc30 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