Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
34f69d64
Commit
34f69d64
authored
Apr 04, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash in subpictures rendering
parent
90e5abe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+14
-15
No files found.
src/video_output/vout_subpictures.c
View file @
34f69d64
...
...
@@ -528,11 +528,10 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_fmt
->
i_height
;
}
if
(
p_subpic
->
p_region
->
fmt
.
i_aspect
==
0
)
/* Set subtitle to be the same aspect ratio as the background
source video.
*/
p_subpic
->
p_region
->
fmt
.
i_aspect
=
p_pic_src
->
format
.
i_aspect
;
if
(
p_region
&&
p_subpic
->
p_region
->
fmt
.
i_aspect
==
0
)
/* Set subtitle to be the same aspect ratio as the background
source video. */
p_subpic
->
p_region
->
fmt
.
i_aspect
=
p_pic_src
->
format
.
i_aspect
;
i_scale_width
=
i_scale_width_orig
;
i_scale_height
=
i_scale_height_orig
;
...
...
@@ -541,20 +540,20 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_subpic
->
i_original_picture_height
)
{
i_scale_width
=
i_scale_width
*
p_fmt
->
i_width
/
p_subpic
->
i_original_picture_width
;
p_subpic
->
i_original_picture_width
;
i_scale_height
=
i_scale_height
*
p_fmt
->
i_height
/
p_subpic
->
i_original_picture_height
;
p_subpic
->
i_original_picture_height
;
}
/* Take care of the aspect ratio */
if
(
p_subpic
->
p_region
->
fmt
.
i_aspect
!=
p_pic_src
->
format
.
i_aspect
)
{
i_scale_width
=
(
p_subpic
->
p_region
->
fmt
.
i_aspect
*
1000
)
/
p_pic_src
->
format
.
i_aspect
;
i_subpic_x
=
p_subpic
->
i_x
*
i_scale_width
/
1000
;
}
else
i_subpic_x
=
p_subpic
->
i_x
;
if
(
p_region
&&
p_subpic
->
p_region
->
fmt
.
i_aspect
!=
p_pic_src
->
format
.
i_aspect
)
{
i_scale_width
=
(
p_subpic
->
p_region
->
fmt
.
i_aspect
*
1000
)
/
p_pic_src
->
format
.
i_aspect
;
i_subpic_x
=
p_subpic
->
i_x
*
i_scale_width
/
1000
;
}
else
i_subpic_x
=
p_subpic
->
i_x
;
if
(
p_region
&&
p_region
->
fmt
.
i_sar_num
*
p_fmt
->
i_sar_den
!=
...
...
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