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
c0331bd0
Commit
c0331bd0
authored
Aug 28, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix the case of duration == -1 in M3U playlists. closes #331
parent
9481a1df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
modules/demux/playlist/m3u.c
modules/demux/playlist/m3u.c
+11
-15
No files found.
modules/demux/playlist/m3u.c
View file @
c0331bd0
...
...
@@ -160,6 +160,7 @@ static int Demux( demux_t *p_demux )
/* Extended info */
psz_parse
+=
sizeof
(
"EXTINF:"
)
-
1
;
parseEXTINF
(
psz_parse
,
&
psz_author
,
&
psz_name
,
&
i_parsed_duration
);
if
(
i_parsed_duration
>=
0
)
i_duration
=
i_parsed_duration
*
1000000
;
if
(
psz_name
)
psz_name
=
strdup
(
psz_name
);
...
...
@@ -270,31 +271,26 @@ static void parseEXTINF(char *psz_string, char **ppsz_author,
char
**
ppsz_name
,
int
*
pi_duration
)
{
char
*
end
=
NULL
;
char
*
psz_item
=
NULL
;
char
*
psz_item
=
NULL
;
char
*
psz_duration
=
NULL
;
char
*
pos
;
end
=
psz_string
+
strlen
(
psz_string
);
/* ignore whitespaces */
for
(;
psz_string
<
end
&&
(
*
psz_string
==
'\t'
||
*
psz_string
==
' '
);
for
(;
psz_string
<
end
&&
(
*
psz_string
==
'\t'
||
*
psz_string
==
' '
);
psz_string
++
);
/* read all digits */
psz_item
=
psz_string
;
while
(
psz_string
<
end
&&
*
psz_string
>=
'0'
&&
*
psz_string
<=
'9'
)
psz_duration
=
strchr
(
psz_string
,
','
);
if
(
psz_duration
)
{
psz_string
++
;
}
if
(
*
psz_item
>=
'0'
&&
*
psz_item
<=
'9'
&&
*
psz_string
==
','
)
{
*
psz_string
=
'\0'
;
*
psz_duration
=
'\0'
;
*
pi_duration
=
atoi
(
psz_item
);
psz_string
=
psz_duration
;
}
else
{
return
;
}
if
(
psz_string
<
end
)
/* continue parsing if possible */
if
(
psz_string
<
end
)
/* continue parsing if possible */
{
psz_string
++
;
}
...
...
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