Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
4f7824b2
Commit
4f7824b2
authored
Aug 01, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: use VLC_TS_INVALID
parent
274f047a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
src/audio_output/common.c
src/audio_output/common.c
+14
-12
src/audio_output/dec.c
src/audio_output/dec.c
+1
-1
src/audio_output/input.c
src/audio_output/input.c
+3
-3
src/audio_output/mixer.c
src/audio_output/mixer.c
+1
-1
No files found.
src/audio_output/common.c
View file @
4f7824b2
...
...
@@ -338,6 +338,7 @@ void aout_FifoInit( vlc_object_t *obj, aout_fifo_t * p_fifo, uint32_t i_rate )
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
date_Init
(
&
p_fifo
->
end_date
,
i_rate
,
1
);
date_Set
(
&
p_fifo
->
end_date
,
VLC_TS_INVALID
);
}
/*****************************************************************************
...
...
@@ -349,7 +350,7 @@ void aout_FifoPush( aout_fifo_t * p_fifo, aout_buffer_t * p_buffer )
p_fifo
->
pp_last
=
&
p_buffer
->
p_next
;
*
p_fifo
->
pp_last
=
NULL
;
/* Enforce the continuity of the stream. */
if
(
date_Get
(
&
p_fifo
->
end_date
)
)
if
(
date_Get
(
&
p_fifo
->
end_date
)
!=
VLC_TS_INVALID
)
{
p_buffer
->
i_pts
=
date_Get
(
&
p_fifo
->
end_date
);
p_buffer
->
i_length
=
date_Increment
(
&
p_fifo
->
end_date
,
...
...
@@ -369,7 +370,7 @@ void aout_FifoReset( aout_fifo_t * p_fifo )
{
aout_buffer_t
*
p_buffer
;
date_Set
(
&
p_fifo
->
end_date
,
0
);
date_Set
(
&
p_fifo
->
end_date
,
VLC_TS_INVALID
);
p_buffer
=
p_fifo
->
p_first
;
while
(
p_buffer
!=
NULL
)
{
...
...
@@ -384,17 +385,17 @@ void aout_FifoReset( aout_fifo_t * p_fifo )
/*****************************************************************************
* aout_FifoMoveDates : Move forwards or backwards all dates in the FIFO
*****************************************************************************/
void
aout_FifoMoveDates
(
aout_fifo_t
*
p_
fifo
,
mtime_t
difference
)
void
aout_FifoMoveDates
(
aout_fifo_t
*
fifo
,
mtime_t
difference
)
{
aout_buffer_t
*
p_buffer
;
date_Move
(
&
p_fifo
->
end_date
,
difference
);
p_buffer
=
p_fifo
->
p_first
;
while
(
p_buffer
!=
NULL
)
if
(
date_Get
(
&
fifo
->
end_date
)
==
VLC_TS_INVALID
)
{
p_buffer
->
i_pts
+=
difference
;
p_buffer
=
p_buffer
->
p_next
;
assert
(
fifo
->
p_first
==
NULL
)
;
return
;
}
date_Move
(
&
fifo
->
end_date
,
difference
);
for
(
block_t
*
block
=
fifo
->
p_first
;
block
!=
NULL
;
block
=
block
->
p_next
)
block
->
i_pts
+=
difference
;
}
/*****************************************************************************
...
...
@@ -409,9 +410,10 @@ mtime_t aout_FifoNextStart( const aout_fifo_t *p_fifo )
* aout_FifoFirstDate : return the playing date of the first buffer in the
* FIFO
*****************************************************************************/
mtime_t
aout_FifoFirstDate
(
const
aout_fifo_t
*
p_
fifo
)
mtime_t
aout_FifoFirstDate
(
const
aout_fifo_t
*
fifo
)
{
return
(
p_fifo
->
p_first
!=
NULL
)
?
p_fifo
->
p_first
->
i_pts
:
0
;
block_t
*
first
=
fifo
->
p_first
;
return
(
first
!=
NULL
)
?
first
->
i_pts
:
VLC_TS_INVALID
;
}
/*****************************************************************************
...
...
src/audio_output/dec.c
View file @
4f7824b2
...
...
@@ -252,5 +252,5 @@ bool aout_DecIsEmpty( audio_output_t * p_aout, aout_input_t * p_input )
aout_lock
(
p_aout
);
end_date
=
aout_FifoNextStart
(
&
p_input
->
fifo
);
aout_unlock
(
p_aout
);
return
end_date
<=
mdate
();
return
end_date
==
VLC_TS_INVALID
||
end_date
<=
mdate
();
}
src/audio_output/input.c
View file @
4f7824b2
...
...
@@ -542,7 +542,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
* with the next incoming buffer. */
start_date
=
aout_FifoNextStart
(
&
p_input
->
fifo
);
if
(
start_date
!=
0
&&
start_date
<
now
)
if
(
start_date
!=
VLC_TS_INVALID
&&
start_date
<
now
)
{
/* The decoder is _very_ late. This can only happen if the user
* pauses the stream (or if the decoder is buggy, which cannot
...
...
@@ -555,7 +555,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
msg_Warn
(
p_aout
,
"timing screwed, stopping resampling"
);
inputResamplingStop
(
p_input
);
p_buffer
->
i_flags
|=
BLOCK_FLAG_DISCONTINUITY
;
start_date
=
0
;
start_date
=
VLC_TS_INVALID
;
}
if
(
p_buffer
->
i_pts
<
now
+
AOUT_MIN_PREPARE_TIME
)
...
...
@@ -571,7 +571,7 @@ void aout_InputPlay( audio_output_t * p_aout, aout_input_t * p_input,
/* If the audio drift is too big then it's not worth trying to resample
* the audio. */
if
(
!
start_date
)
if
(
start_date
==
VLC_TS_INVALID
)
start_date
=
p_buffer
->
i_pts
;
mtime_t
drift
=
start_date
-
p_buffer
->
i_pts
;
...
...
src/audio_output/mixer.c
View file @
4f7824b2
...
...
@@ -111,7 +111,7 @@ static int MixBuffer( audio_output_t * p_aout, float volume )
return
-
1
;
/* Find the earliest start date available. */
if
(
!
start_date
)
if
(
start_date
==
VLC_TS_INVALID
)
{
start_date
=
p_buffer
->
i_pts
;
date_Set
(
&
exact_start_date
,
start_date
);
...
...
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