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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
modules/codec/subsdec.c
modules/codec/subsdec.c
+23
-2
modules/demux/subtitle.c
modules/demux/subtitle.c
+3
-3
No files found.
modules/codec/subsdec.c
View file @
168e56b0
...
...
@@ -981,10 +981,31 @@ static char *CreateHtmlSubtitle( int *pi_align, char *psz_subtitle )
/* Hide {\stupidity} */
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
,
'}'
)
)
{
/* 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
;
}
else
if
(
psz_subtitle
[
0
]
==
'\\'
&&
psz_subtitle
[
1
]
)
...
...
modules/demux/subtitle.c
View file @
168e56b0
...
...
@@ -1681,7 +1681,7 @@ static int ParseJSS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
continue
;
}
}
while
(
psz_text
[
strlen
(
psz_text
)
-
1
]
==
'\\'
)
{
const
char
*
s2
=
TextGetLine
(
txt
);
...
...
@@ -1702,7 +1702,7 @@ static int ParseJSS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
if
(
!
psz_text
)
return
VLC_ENOMEM
;
psz_orig
=
psz_text
;
psz_orig
=
psz_text
;
strcat
(
psz_text
,
s2
);
}
...
...
@@ -1787,7 +1787,7 @@ static int ParseJSS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
else
if
(
*
(
psz_text
+
1
)
==
'\r'
||
*
(
psz_text
+
1
)
==
'\n'
||
*
(
psz_text
+
1
)
==
'\0'
)
{
psz_text
++
;
psz_text
++
;
}
break
;
default:
...
...
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