Commit c65b1f6a authored by François Cartegnie's avatar François Cartegnie 🤞

codec: ttml: fix region percent origin

parent d9e35d47
......@@ -328,7 +328,10 @@ static void FillRegionStyle( const char *psz_attr, const char *psz_val,
p_region->updt.origin.x = atoi( psz_token );
if( psz_percent_sign != NULL && psz_percent_sign < psz_separator )
p_region->updt.flags |= UPDT_REGION_EXTENT_X_IS_PERCENTILE;
{
p_region->updt.origin.x /= 100.0;
p_region->updt.flags |= UPDT_REGION_ORIGIN_X_IS_PERCENTILE;
}
while( isspace( *psz_separator ) )
psz_separator++;
......@@ -337,7 +340,11 @@ static void FillRegionStyle( const char *psz_attr, const char *psz_val,
p_region->updt.origin.y = atoi( psz_token );
if( psz_percent_sign != NULL )
p_region->updt.flags |= UPDT_REGION_EXTENT_Y_IS_PERCENTILE;
{
p_region->updt.origin.y /= 100.0;
p_region->updt.flags |= UPDT_REGION_ORIGIN_Y_IS_PERCENTILE;
}
p_region->updt.align = SUBPICTURE_ALIGN_TOP|SUBPICTURE_ALIGN_LEFT;
}
}
......
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