Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
32ab2ef5
Commit
32ab2ef5
authored
Feb 22, 2006
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Scale SSA subs if necessarry.
* Scale width if only original height is known.
parent
06cc669a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
modules/codec/subsdec.c
modules/codec/subsdec.c
+4
-2
src/video_output/vout_subpictures.c
src/video_output/vout_subpictures.c
+8
-2
No files found.
modules/codec/subsdec.c
View file @
32ab2ef5
...
...
@@ -376,6 +376,8 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
p_spu
->
i_stop
=
p_block
->
i_pts
+
p_block
->
i_length
;
p_spu
->
b_ephemer
=
(
p_block
->
i_length
==
0
);
p_spu
->
b_absolute
=
VLC_FALSE
;
p_spu
->
i_original_picture_width
=
p_sys
->
i_original_width
;
p_spu
->
i_original_picture_height
=
p_sys
->
i_original_height
;
if
(
psz_subtitle
)
free
(
psz_subtitle
);
}
return
p_spu
;
...
...
@@ -559,9 +561,9 @@ static void ParseSSAHeader( decoder_t *p_dec )
if
(
psz_parser
[
0
]
==
'!'
||
psz_parser
[
0
]
==
';'
)
/* comment */
;
else
if
(
sscanf
(
psz_parser
,
"PlayResX: %d"
,
&
temp
)
==
1
)
p_sys
->
i_original_width
=
temp
;
p_sys
->
i_original_width
=
(
temp
>
0
)
?
temp
:
-
1
;
else
if
(
sscanf
(
psz_parser
,
"PlayResY: %d"
,
&
temp
)
==
1
)
p_sys
->
i_original_height
=
temp
;
p_sys
->
i_original_height
=
(
temp
>
0
)
?
temp
:
-
1
;
else
if
(
sscanf
(
psz_parser
,
"Script Type: %8192s"
,
buffer_text
)
==
1
)
{
if
(
!
strcasecmp
(
buffer_text
,
"V4.00+"
)
)
p_sys
->
b_ass
=
VLC_TRUE
;
...
...
src/video_output/vout_subpictures.c
View file @
32ab2ef5
...
...
@@ -527,14 +527,20 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
i_scale_width
=
i_scale_width_orig
;
i_scale_height
=
i_scale_height_orig
;
if
(
p_subpic
->
i_original_picture_
width
&&
p_subpic
->
i_original_picture_
height
)
if
(
p_subpic
->
i_original_picture_
height
>
0
&&
p_subpic
->
i_original_picture_
width
>
0
)
{
i_scale_width
=
i_scale_width
*
p_fmt
->
i_width
/
p_subpic
->
i_original_picture_width
;
i_scale_height
=
i_scale_height
*
p_fmt
->
i_height
/
p_subpic
->
i_original_picture_height
;
}
else
if
(
p_subpic
->
i_original_picture_height
>
0
)
{
i_scale_height
=
i_scale_height
*
p_fmt
->
i_height
/
p_subpic
->
i_original_picture_height
;
i_scale_width
=
i_scale_height
*
i_scale_height
/
p_fmt
->
i_height
;
}
/* Set default subpicture aspect ratio */
if
(
p_region
&&
p_region
->
fmt
.
i_aspect
&&
...
...
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