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
c106f23b
Commit
c106f23b
authored
Oct 22, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* added support for S_SSA and S_ASS old way (fix 1373).
added removing of all {\xxxx} in the SSA stream.
parent
1547721f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
3 deletions
+31
-3
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+31
-3
No files found.
modules/demux/mkv.cpp
View file @
c106f23b
...
...
@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mkv.cpp,v 1.2
8 2003/10/11 21:08:40 hartman
Exp $
* $Id: mkv.cpp,v 1.2
9 2003/10/22 00:00:54 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -1244,7 +1244,9 @@ static int Open( vlc_object_t * p_this )
{
tk
.
i_codec
=
VLC_FOURCC
(
's'
,
'u'
,
'b'
,
't'
);
}
else
if
(
!
strcmp
(
tk
.
psz_codec
,
"S_TEXT/SSA"
)
)
else
if
(
!
strcmp
(
tk
.
psz_codec
,
"S_TEXT/SSA"
)
||
!
strcmp
(
tk
.
psz_codec
,
"S_SSA"
)
||
!
strcmp
(
tk
.
psz_codec
,
"S_ASS"
))
{
tk
.
i_codec
=
VLC_FOURCC
(
's'
,
'u'
,
'b'
,
't'
);
}
...
...
@@ -1632,10 +1634,13 @@ static void BlockDecode( input_thread_t *p_input, KaxBlock *block, mtime_t i_pts
{
p_pes
->
p_first
->
p_payload_end
[
-
1
]
=
'\0'
;
}
if
(
!
strcmp
(
tk
.
psz_codec
,
"S_TEXT/SSA"
)
)
if
(
!
strcmp
(
tk
.
psz_codec
,
"S_TEXT/SSA"
)
||
!
strcmp
(
tk
.
psz_codec
,
"S_SSA"
)
||
!
strcmp
(
tk
.
psz_codec
,
"S_ASS"
))
{
/* remove all fields before text for now */
char
*
start
=
(
char
*
)
p_pes
->
p_first
->
p_payload_start
;
char
*
src
,
*
dst
;
int
i_comma
=
0
;
while
(
*
start
&&
i_comma
<
8
)
...
...
@@ -1647,6 +1652,29 @@ static void BlockDecode( input_thread_t *p_input, KaxBlock *block, mtime_t i_pts
}
memmove
(
p_pes
->
p_first
->
p_payload_start
,
start
,
strlen
(
start
)
+
1
);
/* remove all {\... } stuff */
src
=
dst
=
(
char
*
)
p_pes
->
p_first
->
p_payload_start
;
for
(
;;
)
{
if
(
src
[
0
]
==
'{'
&&
src
[
1
]
==
'\\'
)
{
while
(
*
src
)
{
if
(
*
src
==
'}'
)
{
src
++
;
break
;
}
src
++
;
}
}
if
(
*
src
==
'\0'
)
{
break
;
}
*
dst
++
=
*
src
++
;
}
*
dst
++
=
'\0'
;
}
}
...
...
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