Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9fcae973
Commit
9fcae973
authored
Feb 16, 2011
by
Anton Khirnov
Committed by
Mans Rullgard
Feb 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace remaining uses of parse_date with av_parse_time.
Signed-off-by:
Mans Rullgard
<
mans@mansr.com
>
parent
f6c7375a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
ffserver.c
ffserver.c
+4
-6
rtsp.c
libavformat/rtsp.c
+3
-2
No files found.
ffserver.c
View file @
9fcae973
...
...
@@ -2136,9 +2136,8 @@ static int open_input_stream(HTTPContext *c, const char *info)
buf_size
=
FFM_PACKET_SIZE
;
/* compute position (absolute time) */
if
(
find_info_tag
(
buf
,
sizeof
(
buf
),
"date"
,
info
))
{
stream_pos
=
parse_date
(
buf
,
0
);
if
(
stream_pos
==
INT64_MIN
)
return
-
1
;
if
((
ret
=
av_parse_time
(
&
stream_pos
,
buf
,
0
))
<
0
)
return
ret
;
}
else
if
(
find_info_tag
(
buf
,
sizeof
(
buf
),
"buffer"
,
info
))
{
int
prebuffer
=
strtol
(
buf
,
0
,
10
);
stream_pos
=
av_gettime
()
-
prebuffer
*
(
int64_t
)
1000000
;
...
...
@@ -2149,9 +2148,8 @@ static int open_input_stream(HTTPContext *c, const char *info)
buf_size
=
0
;
/* compute position (relative time) */
if
(
find_info_tag
(
buf
,
sizeof
(
buf
),
"date"
,
info
))
{
stream_pos
=
parse_date
(
buf
,
1
);
if
(
stream_pos
==
INT64_MIN
)
return
-
1
;
if
((
ret
=
av_parse_time
(
&
stream_pos
,
buf
,
1
))
<
0
)
return
ret
;
}
else
stream_pos
=
0
;
}
...
...
libavformat/rtsp.c
View file @
9fcae973
...
...
@@ -22,6 +22,7 @@
#include "libavutil/base64.h"
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/parseutils.h"
#include "libavutil/random_seed.h"
#include "avformat.h"
...
...
@@ -99,11 +100,11 @@ static void rtsp_parse_range_npt(const char *p, int64_t *start, int64_t *end)
*
end
=
AV_NOPTS_VALUE
;
get_word_sep
(
buf
,
sizeof
(
buf
),
"-"
,
&
p
);
*
start
=
parse_date
(
buf
,
1
);
av_parse_time
(
start
,
buf
,
1
);
if
(
*
p
==
'-'
)
{
p
++
;
get_word_sep
(
buf
,
sizeof
(
buf
),
"-"
,
&
p
);
*
end
=
parse_date
(
buf
,
1
);
av_parse_time
(
end
,
buf
,
1
);
}
// av_log(NULL, AV_LOG_DEBUG, "Range Start: %lld\n", *start);
// av_log(NULL, AV_LOG_DEBUG, "Range End: %lld\n", *end);
...
...
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