Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
acb49d8a
Commit
acb49d8a
authored
Nov 29, 2007
by
Jean-Paul Saman
Browse files
Fix devision by zero in spu_RenderSubpictures.
parent
9a3e5785
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/video_output/vout_subpictures.c
View file @
acb49d8a
...
...
@@ -513,12 +513,20 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
subpicture_t
*
p_subpic
,
int
i_scale_width_orig
,
int
i_scale_height_orig
)
{
int
i_source_video_width
=
p_fmt
->
i_width
*
1000
/
i_scale_width_orig
;
int
i_source_video_height
=
p_fmt
->
i_height
*
1000
/
i_scale_height_orig
;
int
i_source_video_width
;
int
i_source_video_height
;
/* Get lock */
vlc_mutex_lock
(
&
p_spu
->
subpicture_lock
);
if
(
i_scale_width_orig
<=
0
)
i_scale_width_orig
=
1
;
if
(
i_scale_height_orig
<=
0
)
i_scale_height_orig
=
1
;
i_source_video_width
=
p_fmt
->
i_width
*
1000
/
i_scale_width_orig
;
i_source_video_height
=
p_fmt
->
i_height
*
1000
/
i_scale_height_orig
;
/* Check i_status again to make sure spudec hasn't destroyed the subpic */
while
(
(
p_subpic
!=
NULL
)
&&
(
p_subpic
->
i_status
!=
FREE_SUBPICTURE
)
)
{
...
...
Write
Preview
Supports
Markdown
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