Commit a9852371 authored by Tobias Güntner's avatar Tobias Güntner Committed by Rémi Denis-Courmont

Merge if conditions

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent bdb70f97
......@@ -260,11 +260,12 @@ static void FindLength( demux_t *p_demux )
if( i_current_pos >= 0 ) stream_Seek( p_demux->s, i_current_pos );
}
/* Find the longest track */
for( int i = 0; i < PS_TK_COUNT; i++ )
{
ps_track_t *tk = &p_sys->tk[i];
if( tk->i_first_pts >= 0 && tk->i_last_pts > 0 )
if( tk->i_last_pts > tk->i_first_pts )
if( tk->i_first_pts >= 0 && tk->i_last_pts > 0 &&
tk->i_last_pts > tk->i_first_pts )
{
int64_t i_length = (int64_t)tk->i_last_pts - tk->i_first_pts;
if( i_length > p_sys->i_length )
......
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