Commit fb51deba authored by Francois Cartegnie's avatar Francois Cartegnie

codec: cc: flag blocks when packetized and ordered

avoids reordering and display delay
parent 5d75b486
......@@ -311,6 +311,12 @@ static block_t *Pop( decoder_t *p_dec )
* XXX it won't work with H264 which use non out of order B picture or MMCO
*/
if( p_sys->i_block && (p_sys->pp_block[0]->i_flags & BLOCK_FLAG_PRIVATE_MASK) )
{
p_sys->i_block--;
return p_sys->pp_block[0];
}
/* Wait for a P and output all *previous* picture by pts order (for
* hierarchical B frames) */
if( p_sys->i_block <= 1 ||
......
......@@ -26,6 +26,8 @@
#include <vlc_bits.h>
#define BLOCK_FLAG_ORDERED_CAPTIONS (0x01 << BLOCK_FLAG_PRIVATE_SHIFT)
/* CC have a maximum rate of 9600 bit/s (per field?) */
#define CC_MAX_DATA_SIZE (2 * 3*600)
enum
......
......@@ -38,6 +38,7 @@
#include <vlc_aout.h>
#include <assert.h>
#include <limits.h>
#include "../codec/cc.h"
/*****************************************************************************
* Module descriptor
......@@ -482,6 +483,7 @@ static block_t * MP4_EIA608_Convert( block_t * p_block )
block_Release( p_block );
p_newblock->i_buffer = i_copied;
p_newblock->i_flags = BLOCK_FLAG_ORDERED_CAPTIONS;
return p_newblock;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment