Browse Source

remove AnyAnnexB helper

(cherry picked from commit d1631827dc)
pull/135/head
Francois Cartegnie 8 years ago
parent
commit
95fc53f6e9
  1. 4
      modules/packetizer/hxxx_nal.h
  2. 17
      modules/packetizer/startcode_helper.h

4
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;

17
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

Loading…
Cancel
Save