Skip to content
Snippets Groups Projects
Commit 81dfea36 authored by François Cartegnie's avatar François Cartegnie :fingers_crossed:
Browse files

packetizer: helper: handle AU_END flag

Using the AU_END hint, we don't need to wait the
next sync code as we know that last block is complete.
Helps cutting 1frame duration, which really helps in low fps.
parent dfa342ba
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,8 @@ static inline block_t *packetizer_Packetize( packetizer_t *p_pack, block_t **pp_
NULL, &p_pack->i_offset, NULL );
p_pack->i_offset -= p_pack->bytestream.i_block_offset;
if( p_pack->i_offset <= (size_t)p_pack->i_startcode )
if( p_pack->i_offset <= (size_t)p_pack->i_startcode &&
(p_pack->bytestream.p_block->i_flags & BLOCK_FLAG_AU_END) == 0 )
return NULL;
}
......@@ -184,6 +185,13 @@ static inline block_t *packetizer_Packetize( packetizer_t *p_pack, block_t **pp_
p_pic->i_pts = p_block_bytestream->i_pts;
p_pic->i_dts = p_block_bytestream->i_dts;
/* Do not wait for next sync code if notified block ends AU */
if( (p_block_bytestream->i_flags & BLOCK_FLAG_AU_END) &&
p_block_bytestream->i_buffer == p_pack->i_offset )
{
p_pic->i_flags |= BLOCK_FLAG_AU_END;
}
block_GetBytes( &p_pack->bytestream, &p_pic->p_buffer[p_pack->i_au_prepend],
p_pic->i_buffer - p_pack->i_au_prepend );
if( p_pack->i_au_prepend > 0 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment