Commit ce72ce94 authored by Thomas Guillem's avatar Thomas Guillem

packetizer: dts: fix endless loop (again)

The "(Not useful if we went through NEXT_SYNC)" assumption is false.  If the
input is not packetized (like from demux/mpeg/es.c), nothing assure that we
have enough data.

see 11513192
parent c0c34ee1
......@@ -240,13 +240,12 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
block_SkipByte( &p_sys->bytestream );
break;
}
p_sys->i_state = STATE_SEND_DATA;
p_sys->i_state = STATE_GET_DATA;
}
break;
case STATE_GET_DATA:
/* Make sure we have enough data.
* (Not useful if we went through NEXT_SYNC) */
/* Make sure we have enough data. */
if( block_WaitBytes( &p_sys->bytestream,
p_sys->dts.i_frame_size ) != VLC_SUCCESS )
{
......@@ -259,8 +258,10 @@ static block_t *PacketizeBlock( decoder_t *p_dec, block_t **pp_block )
if( p_sys->dts.b_substream )
{
/* FIXME: DTSHD is ignored for now */
block_SkipBytes( &p_sys->bytestream, p_sys->dts.i_frame_size );
p_sys->i_state = STATE_NOSYNC;
if( block_SkipBytes( &p_sys->bytestream,
p_sys->dts.i_frame_size ) != VLC_SUCCESS )
return NULL;
break;
}
......
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