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
168e56b0
Commit
168e56b0
authored
Apr 03, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subtitles: basic support for {y:i}, {y:b} and {y:u}
This is not fully working, though... See #1825
parent
39b85ca6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
modules/codec/subsdec.c
modules/codec/subsdec.c
+23
-2
No files found.
modules/codec/subsdec.c
View file @
168e56b0
...
@@ -981,10 +981,31 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
...
@@ -981,10 +981,31 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
/* Hide {\stupidity} */
/* Hide {\stupidity} */
psz_subtitle
=
strchr
(
psz_subtitle
,
'}'
)
+
1
;
psz_subtitle
=
strchr
(
psz_subtitle
,
'}'
)
+
1
;
}
}
else
if
(
psz_subtitle
[
0
]
==
'{'
&&
(
psz_subtitle
[
1
]
==
'Y'
||
psz_subtitle
[
1
]
==
'y'
)
else
if
(
psz_subtitle
[
0
]
==
'{'
&&
(
psz_subtitle
[
1
]
==
'Y'
||
psz_subtitle
[
1
]
==
'y'
)
&&
psz_subtitle
[
2
]
==
':'
&&
strchr
(
psz_subtitle
,
'}'
)
)
&&
psz_subtitle
[
2
]
==
':'
&&
strchr
(
psz_subtitle
,
'}'
)
)
{
{
/* Hide {Y:stupidity} */
// FIXME: We don't do difference between Y and y, and we should.
if
(
psz_subtitle
[
3
]
==
'i'
)
{
HtmlPut
(
&
psz_html
,
"<i>"
);
strcat
(
psz_tag
,
"i"
);
}
if
(
psz_subtitle
[
3
]
==
'b'
)
{
HtmlPut
(
&
psz_html
,
"<b>"
);
strcat
(
psz_tag
,
"b"
);
}
if
(
psz_subtitle
[
3
]
==
'u'
)
{
HtmlPut
(
&
psz_html
,
"<u>"
);
strcat
(
psz_tag
,
"u"
);
}
psz_subtitle
=
strchr
(
psz_subtitle
,
'}'
)
+
1
;
}
else
if
(
psz_subtitle
[
0
]
==
'{'
&&
psz_subtitle
[
2
]
==
':'
&&
strchr
(
psz_subtitle
,
'}'
)
)
{
// Hide other {x:y} atrocities, like {c:$bbggrr} or {P:x}
psz_subtitle
=
strchr
(
psz_subtitle
,
'}'
)
+
1
;
psz_subtitle
=
strchr
(
psz_subtitle
,
'}'
)
+
1
;
}
}
else
if
(
psz_subtitle
[
0
]
==
'\\'
&&
psz_subtitle
[
1
]
)
else
if
(
psz_subtitle
[
0
]
==
'\\'
&&
psz_subtitle
[
1
]
)
...
...
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