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
6d951bda
Commit
6d951bda
authored
Feb 20, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msecstotimestr: fix negative numbers handling
parent
820b4643
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/misc/mtime.c
src/misc/mtime.c
+9
-2
No files found.
src/misc/mtime.c
View file @
6d951bda
...
...
@@ -127,6 +127,13 @@ char *mstrtime( char *psz_buffer, mtime_t date )
*/
char
*
secstotimestr
(
char
*
psz_buffer
,
int32_t
i_seconds
)
{
if
(
unlikely
(
i_seconds
<
0
)
)
{
secstotimestr
(
psz_buffer
+
1
,
-
i_seconds
);
*
psz_buffer
=
'-'
;
return
psz_buffer
;
}
div_t
d
;
d
=
div
(
i_seconds
,
60
);
...
...
@@ -137,8 +144,8 @@ char *secstotimestr( char *psz_buffer, int32_t i_seconds )
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%u:%02u:%02u"
,
d
.
quot
,
d
.
rem
,
i_seconds
);
else
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%02u:%02u"
,
d
.
rem
,
i_seconds
);
snprintf
(
psz_buffer
,
MSTRTIME_MAX_SIZE
,
"%02u:%02u"
,
d
.
rem
,
i_seconds
);
return
psz_buffer
;
}
...
...
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