Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3ddc22f2
Commit
3ddc22f2
authored
Jun 01, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix NULL dereference (unlikely) (CID 112)
parent
cee010ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
modules/codec/subsdec.c
modules/codec/subsdec.c
+9
-5
No files found.
modules/codec/subsdec.c
View file @
3ddc22f2
...
...
@@ -210,7 +210,9 @@ static int OpenDecoder( vlc_object_t *p_this )
var_Create
(
p_dec
,
"subsdec-encoding"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_dec
,
"subsdec-encoding"
,
&
val
);
if
(
!
strcmp
(
val
.
psz_string
,
DEFAULT_NAME
)
)
if
(
!
val
.
psz_string
||
!*
val
.
psz_string
)
(
void
)
0
;
else
if
(
!
strcmp
(
val
.
psz_string
,
DEFAULT_NAME
)
)
{
const
char
*
psz_charset
=
GetFallbackEncoding
();
...
...
@@ -218,22 +220,24 @@ static int OpenDecoder( vlc_object_t *p_this )
"subsdec-autodetect-utf8"
);
p_sys
->
iconv_handle
=
vlc_iconv_open
(
"UTF-8"
,
psz_charset
);
msg_Dbg
(
p_dec
,
"using fallback character encoding: %s"
,
psz_charset
);
msg_Dbg
(
p_dec
,
"using fallback character encoding: %s"
,
psz_charset
);
}
else
if
(
!
strcmp
(
val
.
psz_string
,
"UTF-8"
)
)
{
msg_Dbg
(
p_dec
,
"using enforced character encoding: UTF-8"
);
}
else
if
(
val
.
psz_string
)
else
{
msg_Dbg
(
p_dec
,
"using enforced character encoding: %s"
,
val
.
psz_string
);
msg_Dbg
(
p_dec
,
"using enforced character encoding: %s"
,
val
.
psz_string
);
p_sys
->
iconv_handle
=
vlc_iconv_open
(
"UTF-8"
,
val
.
psz_string
);
if
(
p_sys
->
iconv_handle
==
(
vlc_iconv_t
)
-
1
)
{
msg_Warn
(
p_dec
,
"unable to do requested conversion"
);
}
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
free
(
val
.
psz_string
);
}
var_Create
(
p_dec
,
"subsdec-align"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
...
...
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