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
4f6b904c
Commit
4f6b904c
authored
Jun 10, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify + fix a potential overflow.
parent
ba9cf795
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
src/audio_output/dec.c
src/audio_output/dec.c
+1
-1
src/audio_output/input.c
src/audio_output/input.c
+15
-18
No files found.
src/audio_output/dec.c
View file @
4f6b904c
...
@@ -341,7 +341,7 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -341,7 +341,7 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input,
}
}
p_buffer
->
end_date
=
p_buffer
->
start_date
p_buffer
->
end_date
=
p_buffer
->
start_date
+
(
mtime_t
)
(
p_buffer
->
i_nb_samples
*
1000000
)
+
(
mtime_t
)
p_buffer
->
i_nb_samples
*
1000000
/
p_input
->
input
.
i_rate
;
/
p_input
->
input
.
i_rate
;
vlc_mutex_lock
(
&
p_input
->
lock
);
vlc_mutex_lock
(
&
p_input
->
lock
);
...
...
src/audio_output/input.c
View file @
4f6b904c
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include "input/input_internal.h"
#include "input/input_internal.h"
static
void
inputFailure
(
aout_instance_t
*
,
aout_input_t
*
,
const
char
*
);
static
void
inputFailure
(
aout_instance_t
*
,
aout_input_t
*
,
const
char
*
);
static
void
inputDrop
(
aout_instance_t
*
,
aout_input_t
*
);
static
int
VisualizationCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
VisualizationCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
EqualizerCallback
(
vlc_object_t
*
,
char
const
*
,
static
int
EqualizerCallback
(
vlc_object_t
*
,
char
const
*
,
...
@@ -448,12 +449,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -448,12 +449,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
p_input
->
pp_resamplers
[
0
]
->
b_continuity
=
VLC_FALSE
;
p_input
->
pp_resamplers
[
0
]
->
b_continuity
=
VLC_FALSE
;
}
}
start_date
=
0
;
start_date
=
0
;
if
(
p_input
->
p_input_thread
)
inputDrop
(
p_aout
,
p_input
);
{
vlc_mutex_lock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
stats_UpdateInteger
(
p_aout
,
p_input
->
p_input_thread
->
p
->
counters
.
p_lost_abuffers
,
1
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
}
}
}
if
(
p_buffer
->
start_date
<
mdate
()
+
AOUT_MIN_PREPARE_TIME
)
if
(
p_buffer
->
start_date
<
mdate
()
+
AOUT_MIN_PREPARE_TIME
)
...
@@ -462,12 +458,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -462,12 +458,8 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
* can't present it anyway, so drop the buffer. */
* can't present it anyway, so drop the buffer. */
msg_Warn
(
p_aout
,
"PTS is out of range ("
I64Fd
"), dropping buffer"
,
msg_Warn
(
p_aout
,
"PTS is out of range ("
I64Fd
"), dropping buffer"
,
mdate
()
-
p_buffer
->
start_date
);
mdate
()
-
p_buffer
->
start_date
);
if
(
p_input
->
p_input_thread
)
{
inputDrop
(
p_aout
,
p_input
);
vlc_mutex_lock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
stats_UpdateInteger
(
p_aout
,
p_input
->
p_input_thread
->
p
->
counters
.
p_lost_abuffers
,
1
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
}
aout_BufferFree
(
p_buffer
);
aout_BufferFree
(
p_buffer
);
p_input
->
i_resampling_type
=
AOUT_RESAMPLING_NONE
;
p_input
->
i_resampling_type
=
AOUT_RESAMPLING_NONE
;
if
(
p_input
->
i_nb_resamplers
!=
0
)
if
(
p_input
->
i_nb_resamplers
!=
0
)
...
@@ -505,12 +497,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -505,12 +497,7 @@ int aout_InputPlay( aout_instance_t * p_aout, aout_input_t * p_input,
msg_Warn
(
p_aout
,
"audio drift is too big ("
I64Fd
"), dropping buffer"
,
msg_Warn
(
p_aout
,
"audio drift is too big ("
I64Fd
"), dropping buffer"
,
start_date
-
p_buffer
->
start_date
);
start_date
-
p_buffer
->
start_date
);
aout_BufferFree
(
p_buffer
);
aout_BufferFree
(
p_buffer
);
if
(
p_input
->
p_input_thread
)
inputDrop
(
p_aout
,
p_input
);
{
vlc_mutex_lock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
stats_UpdateInteger
(
p_aout
,
p_input
->
p_input_thread
->
p
->
counters
.
p_lost_abuffers
,
1
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
}
return
0
;
return
0
;
}
}
...
@@ -645,6 +632,16 @@ static void inputFailure( aout_instance_t * p_aout, aout_input_t * p_input,
...
@@ -645,6 +632,16 @@ static void inputFailure( aout_instance_t * p_aout, aout_input_t * p_input,
p_input
->
b_error
=
1
;
p_input
->
b_error
=
1
;
}
}
static
void
inputDrop
(
aout_instance_t
*
p_aout
,
aout_input_t
*
p_input
)
{
if
(
!
p_input
->
p_input_thread
)
return
;
vlc_mutex_lock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
stats_UpdateInteger
(
p_aout
,
p_input
->
p_input_thread
->
p
->
counters
.
p_lost_abuffers
,
1
,
NULL
);
vlc_mutex_unlock
(
&
p_input
->
p_input_thread
->
p
->
counters
.
counters_lock
);
}
static
int
ChangeFiltersString
(
aout_instance_t
*
p_aout
,
const
char
*
psz_variable
,
static
int
ChangeFiltersString
(
aout_instance_t
*
p_aout
,
const
char
*
psz_variable
,
const
char
*
psz_name
,
vlc_bool_t
b_add
)
const
char
*
psz_name
,
vlc_bool_t
b_add
)
{
{
...
...
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