Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
0b2d112a
Commit
0b2d112a
authored
Oct 10, 2008
by
Laurent Aimar
Browse files
Do not assert on non 0 divider in aout_DateInit.
A lot of codecs do init it to 0 and fix it later.
parent
089089ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/audio_output/common.c
View file @
0b2d112a
...
...
@@ -479,7 +479,6 @@ void aout_FifoDestroy( aout_instance_t * p_aout, aout_fifo_t * p_fifo )
*****************************************************************************/
void
aout_DateInit
(
audio_date_t
*
p_date
,
uint32_t
i_divider
)
{
assert
(
i_divider
);
p_date
->
date
=
0
;
p_date
->
i_divider
=
i_divider
;
p_date
->
i_remainder
=
0
;
...
...
@@ -517,7 +516,7 @@ mtime_t aout_DateGet( const audio_date_t * p_date )
mtime_t
aout_DateIncrement
(
audio_date_t
*
p_date
,
uint32_t
i_nb_samples
)
{
mtime_t
i_dividend
=
INT64_C
(
1000000
)
*
i_nb_samples
;
assert
(
p_date
->
i_divider
);
/* uninitialized audio_data_t ? */
assert
(
p_date
->
i_divider
>
0
);
/* uninitialized audio_data_t ? */
p_date
->
date
+=
i_dividend
/
p_date
->
i_divider
;
p_date
->
i_remainder
+=
(
int
)(
i_dividend
%
p_date
->
i_divider
);
if
(
p_date
->
i_remainder
>=
p_date
->
i_divider
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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