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
0ddb1b01
Commit
0ddb1b01
authored
Oct 20, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not call decode_URI on constant string.
parent
fe587068
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
src/input/subtitles.c
src/input/subtitles.c
+14
-8
No files found.
src/input/subtitles.c
View file @
0ddb1b01
...
...
@@ -259,18 +259,18 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
vlc_subfn_t
*
result
=
NULL
;
/* unsorted results */
char
**
result2
;
/* sorted results */
const
char
*
psz_fname
=
psz_name_org
;
if
(
!
psz_fname
)
if
(
!
psz_name_org
)
return
NULL
;
if
(
!
strncmp
(
psz_
fname
,
"file://"
,
7
)
)
if
(
!
strncmp
(
psz_
name_org
,
"file://"
,
7
)
)
{
psz_
fname
+=
7
;
if
(
!
strncmp
(
psz_
fname
,
"localhost"
,
9
)
)
psz_
fname
+=
9
;
psz_
name_org
+=
7
;
if
(
!
strncmp
(
psz_
name_org
,
"localhost"
,
9
)
)
psz_
name_org
+=
9
;
}
psz_fname
=
decode_URI
(
psz_fname
);
char
*
psz_fname
=
decode_URI_duplicate
(
psz_name_org
);
if
(
!
psz_fname
)
return
NULL
;
/* extract filename & dirname from psz_fname */
tmp
=
strrchr
(
psz_fname
,
DIR_SEP_CHAR
);
...
...
@@ -289,7 +289,10 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
char
*
psz_cwd
=
NULL
;
#endif
if
(
!
psz_cwd
)
{
free
(
psz_fname
);
return
NULL
;
}
f_fname
=
strdup
(
psz_fname
);
if
(
asprintf
(
&
f_dir
,
"%s%c"
,
psz_cwd
,
DIR_SEP_CHAR
)
==
-
1
)
...
...
@@ -300,6 +303,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
{
free
(
f_fname
);
free
(
f_dir
);
free
(
psz_fname
);
return
NULL
;
}
...
...
@@ -313,6 +317,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
free
(
f_dir
);
free
(
f_fname_noext
);
free
(
f_fname_trim
);
free
(
psz_fname
);
return
NULL
;
}
...
...
@@ -428,6 +433,7 @@ char **subtitles_Detect( input_thread_t *p_this, char *psz_path,
free
(
f_dir
);
free
(
f_fname_trim
);
free
(
f_fname_noext
);
free
(
psz_fname
);
if
(
!
result
)
return
NULL
;
...
...
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