Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
afaea620
Commit
afaea620
authored
Jan 26, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used name in
UTF-16
format for embed AVI subtitles (close #2357).
parent
7edb3125
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/demux/avi/avi.c
modules/demux/avi/avi.c
+9
-3
No files found.
modules/demux/avi/avi.c
View file @
afaea620
...
...
@@ -2498,11 +2498,13 @@ static void AVI_ExtractSubtitle( demux_t *p_demux,
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
block_t
*
p_block
=
NULL
;
input_attachment_t
*
p_attachment
=
NULL
;
char
*
psz_description
=
NULL
;
avi_chunk_indx_t
*
p_indx
=
NULL
;
if
(
!
p_sys
->
b_seekable
)
goto
exit
;
avi_chunk_indx_t
*
p_indx
=
AVI_ChunkFind
(
p_strl
,
AVIFOURCC_indx
,
0
);
p_indx
=
AVI_ChunkFind
(
p_strl
,
AVIFOURCC_indx
,
0
);
if
(
!
p_indx
)
goto
exit
;
...
...
@@ -2548,6 +2550,8 @@ static void AVI_ExtractSubtitle( demux_t *p_demux,
const
unsigned
i_name
=
GetDWLE
(
&
p
[
7
]
);
if
(
11
+
i_size
<=
i_name
)
goto
exit
;
if
(
i_name
>
0
)
psz_description
=
FromCharset
(
"UTF-16LE"
,
&
p
[
11
],
i_name
);
p
+=
11
+
i_name
;
i_size
-=
11
+
i_name
;
if
(
i_size
<
6
||
GetWLE
(
&
p
[
0
]
)
!=
0x04
)
...
...
@@ -2558,7 +2562,8 @@ static void AVI_ExtractSubtitle( demux_t *p_demux,
p
+=
6
;
i_size
-=
6
;
char
*
psz_description
=
p_strn
?
FromLatin1
(
p_strn
->
p_str
)
:
NULL
;
if
(
!
psz_description
)
psz_description
=
p_strn
?
FromLatin1
(
p_strn
->
p_str
)
:
NULL
;
char
*
psz_name
;
if
(
asprintf
(
&
psz_name
,
"subtitle%d.srt"
,
p_sys
->
i_attachment
)
<=
0
)
psz_name
=
NULL
;
...
...
@@ -2569,9 +2574,10 @@ static void AVI_ExtractSubtitle( demux_t *p_demux,
if
(
p_attachment
)
TAB_APPEND
(
p_sys
->
i_attachment
,
p_sys
->
attachment
,
p_attachment
);
free
(
psz_name
);
free
(
psz_description
);
exit:
free
(
psz_description
);
if
(
p_block
)
block_Release
(
p_block
);
...
...
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