Commit 5cd17d17 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: minibox: fix dead loop

parent a38f6756
......@@ -369,7 +369,8 @@ static int Decode( decoder_t *p_dec, block_t *p_block )
subpicture_updater_sys_t *p_spu_sys = p_spu->updater.p_sys;
mp4_box_iterator_t it;
mp4_box_iterator_Init( &it, p_block->p_buffer, p_block->i_buffer );
mp4_box_iterator_Init( &it, p_buf,
p_block->i_buffer - (p_buf - p_block->p_buffer) );
/* Parse our styles */
while( mp4_box_iterator_Next( &it ) )
{
......
......@@ -50,6 +50,7 @@ static bool mp4_box_iterator_Next( mp4_box_iterator_t *p_it )
p_it->i_buffer -= i_size;
return true;
}
else break;
}
return false;
}
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