Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
b501789d
Commit
b501789d
authored
May 10, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed segfault with some OSD.
parent
6e8939e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
24 deletions
+4
-24
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+4
-24
No files found.
src/video_output/vout_subpictures.c
View file @
b501789d
...
@@ -1404,25 +1404,6 @@ static void SpuRegionPlace( int *pi_x, int *pi_y,
...
@@ -1404,25 +1404,6 @@ static void SpuRegionPlace( int *pi_x, int *pi_y,
i_y
=
i_delta_y
;
i_y
=
i_delta_y
;
}
}
/* Margin shifts all subpictures */
/* NOTE We have margin only for subtitles, so we don't really need this here
if( i_margin_y != 0 )
i_y -= i_margin_y;*/
/* Clamp offset to not go out of the screen (when possible) */
/* NOTE Again, useful only for subtitles, otherwise goes against the alignment logic above
const int i_error_x = (i_x + p_region->fmt.i_width) - p_subpic->i_original_picture_width;
if( i_error_x > 0 )
i_x -= i_error_x;
if( i_x < 0 )
i_x = 0;
const int i_error_y = (i_y + p_region->fmt.i_height) - p_subpic->i_original_picture_height;
if( i_error_y > 0 )
i_y -= i_error_y;
if( i_y < 0 )
i_y = 0;*/
*
pi_x
=
i_x
;
*
pi_x
=
i_x
;
*
pi_y
=
i_y
;
*
pi_y
=
i_y
;
}
}
...
@@ -1529,12 +1510,11 @@ static void SpuRenderRegion( spu_t *p_spu,
...
@@ -1529,12 +1510,11 @@ static void SpuRenderRegion( spu_t *p_spu,
/* apply margin to subtitles and correct if they go over the picture edge */
/* apply margin to subtitles and correct if they go over the picture edge */
if
(
p_subpic
->
b_subtitle
)
if
(
p_subpic
->
b_subtitle
)
{
restrained
.
i_y
-=
i_margin_y
;
restrained
.
i_y
-=
i_margin_y
;
spu_area_t
display
=
spu_area_create
(
0
,
0
,
p_fmt
->
i_width
,
p_fmt
->
i_height
,
spu_scale_unit
()
);
spu_area_t
display
=
spu_area_create
(
0
,
0
,
p_fmt
->
i_width
,
p_fmt
->
i_height
,
SpuAreaFitInside
(
&
restrained
,
&
display
);
spu_scale_unit
()
);
}
SpuAreaFitInside
(
&
restrained
,
&
display
);
/* Fix the position for the current scale_size */
/* Fix the position for the current scale_size */
i_x_offset
=
spu_scale_w
(
restrained
.
i_x
,
restrained
.
scale
);
i_x_offset
=
spu_scale_w
(
restrained
.
i_x
,
restrained
.
scale
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment