Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
32e1127d
Commit
32e1127d
authored
Jul 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aout: inline aout_DecNewBuffer()
parent
59e4f588
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
24 deletions
+11
-24
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+0
-1
src/audio_output/dec.c
src/audio_output/dec.c
+0
-19
src/input/decoder.c
src/input/decoder.c
+11
-4
No files found.
src/audio_output/aout_internal.h
View file @
32e1127d
...
...
@@ -136,7 +136,6 @@ bool aout_ChangeFilterString( vlc_object_t *manager, vlc_object_t *aout,
int
aout_DecNew
(
audio_output_t
*
,
const
audio_sample_format_t
*
,
const
audio_replay_gain_t
*
,
const
aout_request_vout_t
*
);
void
aout_DecDelete
(
audio_output_t
*
);
block_t
*
aout_DecNewBuffer
(
audio_output_t
*
,
size_t
);
void
aout_DecDeleteBuffer
(
audio_output_t
*
,
block_t
*
);
int
aout_DecPlay
(
audio_output_t
*
,
block_t
*
,
int
i_input_rate
);
int
aout_DecGetResetLost
(
audio_output_t
*
);
...
...
src/audio_output/dec.c
View file @
32e1127d
...
...
@@ -182,25 +182,6 @@ void aout_RequestRestart (audio_output_t *aout, unsigned mode)
* Buffer management
*/
/*****************************************************************************
* aout_DecNewBuffer : ask for a new empty buffer
*****************************************************************************/
block_t
*
aout_DecNewBuffer
(
audio_output_t
*
aout
,
size_t
samples
)
{
/* NOTE: the caller is responsible for serializing input change */
aout_owner_t
*
owner
=
aout_owner
(
aout
);
size_t
length
=
samples
*
owner
->
input_format
.
i_bytes_per_frame
/
owner
->
input_format
.
i_frame_length
;
block_t
*
block
=
block_Alloc
(
length
);
if
(
likely
(
block
!=
NULL
)
)
{
block
->
i_nb_samples
=
samples
;
block
->
i_pts
=
block
->
i_length
=
0
;
}
return
block
;
}
/*****************************************************************************
* aout_DecDeleteBuffer : destroy an undecoded buffer
*****************************************************************************/
...
...
src/input/decoder.c
View file @
32e1127d
...
...
@@ -2189,7 +2189,6 @@ static block_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
/* Parameters changed, restart the aout */
vlc_mutex_lock
(
&
p_owner
->
lock
);
DecoderFlushBuffering
(
p_dec
);
aout_DecDelete
(
p_owner
->
p_aout
);
...
...
@@ -2261,13 +2260,21 @@ static block_t *aout_new_buffer( decoder_t *p_dec, int i_samples )
p_dec
->
b_error
=
true
;
return
NULL
;
}
aout_FormatPrepare
(
&
p_owner
->
audio
);
p_dec
->
fmt_out
.
audio
.
i_bytes_per_frame
=
p_owner
->
audio
.
i_bytes_per_frame
;
}
p_buffer
=
aout_DecNewBuffer
(
p_owner
->
p_aout
,
i_samples
);
return
p_buffer
;
size_t
length
=
i_samples
*
p_owner
->
audio
.
i_bytes_per_frame
/
p_owner
->
audio
.
i_frame_length
;
block_t
*
block
=
block_Alloc
(
length
);
if
(
likely
(
block
!=
NULL
)
)
{
block
->
i_nb_samples
=
i_samples
;
block
->
i_pts
=
block
->
i_length
=
0
;
}
return
block
;
}
static
picture_t
*
vout_new_buffer
(
decoder_t
*
p_dec
)
...
...
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