Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
a48dd14f
Commit
a48dd14f
authored
Jan 26, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/input/subtitles.c: more sanity checks.
parent
133d08f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/input/subtitles.c
src/input/subtitles.c
+10
-7
No files found.
src/input/subtitles.c
View file @
a48dd14f
...
...
@@ -2,7 +2,7 @@
* subtitles.c
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id: subtitles.c,v 1.
8 2004/01/25 17:16:06 zorglub
Exp $
* $Id: subtitles.c,v 1.
9 2004/01/26 19:20:10 gbazin
Exp $
*
* Authors: Derk-Jan Hartman <hartman at videolan.org>
* This is adapted code from the GPL'ed MPlayer (http://mplayerhq.hu)
...
...
@@ -165,7 +165,8 @@ static int compare_sub_priority( const void *a, const void *b )
* \return a NULL terminated array of filenames with detected possible subtitles.
* The array contains max MAX_SUBTITLE_FILES items and you need to free it after use.
*/
char
**
subtitles_Detect
(
input_thread_t
*
p_this
,
char
*
psz_path
,
char
*
psz_fname
)
char
**
subtitles_Detect
(
input_thread_t
*
p_this
,
char
*
psz_path
,
char
*
psz_fname
)
{
/* variables to be used for derivatives of psz_fname */
char
*
f_dir
,
*
f_fname
,
*
f_fname_noext
,
*
f_fname_trim
,
*
tmp
;
...
...
@@ -204,14 +205,16 @@ char** subtitles_Detect( input_thread_t *p_this, char *psz_path, char *psz_fname
if
(
tmp
)
{
int
pos
;
strcpy
(
f_fname
,
tmp
+
1
);
pos
=
tmp
-
psz_fname
;
strncpy
(
f_dir
,
psz_fname
,
pos
+
1
);
f_dir
[
pos
+
1
]
=
0
;
strncpy
(
f_fname
,
tmp
+
1
,
len
-
1
);
f_fname
[
len
-
1
]
=
0
;
pos
=
tmp
-
psz_fname
+
1
;
strncpy
(
f_dir
,
psz_fname
,
__MIN
(
pos
,
len
-
1
)
);
f_dir
[
__MIN
(
pos
,
len
-
1
)]
=
0
;
}
else
{
strcpy
(
f_fname
,
psz_fname
);
strncpy
(
f_fname
,
psz_fname
,
len
-
1
);
f_fname
[
len
-
1
]
=
0
;
strcpy
(
f_dir
,
""
);
}
...
...
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