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
daece4c6
Commit
daece4c6
authored
Feb 22, 2013
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: use NAN to signal invalid external clock
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
26c208cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
ffplay.c
ffplay.c
+4
-5
No files found.
ffplay.c
View file @
daece4c6
...
...
@@ -1156,7 +1156,8 @@ static void update_external_clock_pts(VideoState *is, double pts)
}
static
void
check_external_clock_sync
(
VideoState
*
is
,
double
pts
)
{
if
(
fabs
(
get_external_clock
(
is
)
-
pts
)
>
AV_NOSYNC_THRESHOLD
)
{
double
ext_clock
=
get_external_clock
(
is
);
if
(
isnan
(
ext_clock
)
||
fabs
(
ext_clock
-
pts
)
>
AV_NOSYNC_THRESHOLD
)
{
update_external_clock_pts
(
is
,
pts
);
}
}
...
...
@@ -2717,8 +2718,7 @@ static int read_thread(void *arg)
packet_queue_put
(
&
is
->
videoq
,
&
flush_pkt
);
}
if
(
is
->
seek_flags
&
AVSEEK_FLAG_BYTE
)
{
//FIXME: use a cleaner way to signal obsolete external clock...
update_external_clock_pts
(
is
,
(
double
)
AV_NOPTS_VALUE
);
update_external_clock_pts
(
is
,
NAN
);
}
else
{
update_external_clock_pts
(
is
,
seek_target
/
(
double
)
AV_TIME_BASE
);
}
...
...
@@ -2854,8 +2854,7 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
is
->
continue_read_thread
=
SDL_CreateCond
();
//FIXME: use a cleaner way to signal obsolete external clock...
update_external_clock_pts
(
is
,
(
double
)
AV_NOPTS_VALUE
);
update_external_clock_pts
(
is
,
NAN
);
update_external_clock_speed
(
is
,
1
.
0
);
is
->
audio_current_pts_drift
=
-
av_gettime
()
/
1000000
.
0
;
is
->
video_current_pts_drift
=
is
->
audio_current_pts_drift
;
...
...
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