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
f4bd2584
Commit
f4bd2584
authored
Sep 28, 2002
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Several stability patches for multiple input streams aout.
parent
ef6c706b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
17 deletions
+75
-17
modules/audio_mixer/spdif.c
modules/audio_mixer/spdif.c
+27
-3
modules/audio_mixer/trivial.c
modules/audio_mixer/trivial.c
+33
-5
modules/codec/faad/decoder.c
modules/codec/faad/decoder.c
+3
-1
modules/codec/lpcm.c
modules/codec/lpcm.c
+2
-1
modules/codec/mad/decoder.c
modules/codec/mad/decoder.c
+1
-1
src/audio_output/mixer.c
src/audio_output/mixer.c
+9
-6
No files found.
modules/audio_mixer/spdif.c
View file @
f4bd2584
...
...
@@ -2,7 +2,7 @@
* spdif.c : dummy mixer for S/PDIF output (1 input only)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: spdif.c,v 1.
6 2002/09/20 23:27:03
massiot Exp $
* $Id: spdif.c,v 1.
7 2002/09/28 13:05:16
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -73,8 +73,32 @@ static int Create( vlc_object_t *p_this )
*****************************************************************************/
static
void
DoWork
(
aout_instance_t
*
p_aout
,
aout_buffer_t
*
p_buffer
)
{
aout_input_t
*
p_input
=
p_aout
->
pp_inputs
[
0
];
if
(
p_input
->
b_error
)
return
;
int
i
=
0
;
aout_input_t
*
p_input
=
p_aout
->
pp_inputs
[
i
];
while
(
p_input
->
b_error
)
{
p_input
=
p_aout
->
pp_inputs
[
++
i
];
}
aout_FifoPop
(
p_aout
,
&
p_input
->
fifo
);
/* Empty other FIFOs to avoid a memory leak. */
for
(
i
++
;
i
<
p_aout
->
i_nb_inputs
;
i
++
)
{
aout_fifo_t
*
p_fifo
;
aout_buffer_t
*
p_deleted
;
p_input
=
p_aout
->
pp_inputs
[
i
];
if
(
p_input
->
b_error
)
continue
;
p_fifo
=
&
p_input
->
fifo
;
p_deleted
=
p_fifo
->
p_first
;
while
(
p_deleted
!=
NULL
)
{
aout_buffer_t
*
p_next
=
p_deleted
->
p_next
;
aout_BufferFree
(
p_deleted
);
p_deleted
=
p_next
;
}
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
}
}
modules/audio_mixer/trivial.c
View file @
f4bd2584
...
...
@@ -2,7 +2,7 @@
* trivial.c : trivial mixer plug-in (1 input, no downmixing)
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: trivial.c,v 1.
7 2002/09/20 23:27:03
massiot Exp $
* $Id: trivial.c,v 1.
8 2002/09/28 13:05:16
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -71,13 +71,21 @@ static int Create( vlc_object_t *p_this )
*****************************************************************************/
static
void
DoWork
(
aout_instance_t
*
p_aout
,
aout_buffer_t
*
p_buffer
)
{
aout_input_t
*
p_input
=
p_aout
->
pp_inputs
[
0
];
int
i
=
0
;
aout_input_t
*
p_input
=
p_aout
->
pp_inputs
[
i
];
int
i_nb_bytes
=
p_buffer
->
i_nb_samples
*
sizeof
(
s32
)
*
p_aout
->
mixer
.
mixer
.
i_channels
;
byte_t
*
p_in
=
p_input
->
p_first_byte_to_mix
;
byte_t
*
p_out
=
p_buffer
->
p_buffer
;
byte_t
*
p_in
;
byte_t
*
p_out
;
if
(
p_input
->
b_error
)
return
;
while
(
p_input
->
b_error
)
{
p_input
=
p_aout
->
pp_inputs
[
++
i
];
/* This can't crash because if no input has b_error == 0, the
* audio mixer cannot run and we can't be here. */
}
p_in
=
p_input
->
p_first_byte_to_mix
;
p_out
=
p_buffer
->
p_buffer
;
for
(
;
;
)
{
...
...
@@ -114,5 +122,25 @@ static void DoWork( aout_instance_t * p_aout, aout_buffer_t * p_buffer )
break
;
}
}
/* Empty other FIFOs to avoid a memory leak. */
for
(
i
++
;
i
<
p_aout
->
i_nb_inputs
;
i
++
)
{
aout_fifo_t
*
p_fifo
;
aout_buffer_t
*
p_deleted
;
p_input
=
p_aout
->
pp_inputs
[
i
];
if
(
p_input
->
b_error
)
continue
;
p_fifo
=
&
p_input
->
fifo
;
p_deleted
=
p_fifo
->
p_first
;
while
(
p_deleted
!=
NULL
)
{
aout_buffer_t
*
p_next
=
p_deleted
->
p_next
;
aout_BufferFree
(
p_deleted
);
p_deleted
=
p_next
;
}
p_fifo
->
p_first
=
NULL
;
p_fifo
->
pp_last
=
&
p_fifo
->
p_first
;
}
}
modules/codec/faad/decoder.c
View file @
f4bd2584
...
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.
3 2002/09/26 22:40:21
massiot Exp $
* $Id: decoder.c,v 1.
4 2002/09/28 13:05:16
massiot Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -329,6 +329,8 @@ static int InitThread( adec_thread_t * p_adec )
p_adec
->
output_format
.
i_format
=
AOUT_FMT_FLOAT32
;
p_adec
->
output_format
.
i_rate
=
i_rate
;
p_adec
->
output_format
.
i_channels
=
i_channels
;
p_adec
->
p_aout
=
NULL
;
p_adec
->
p_aout_input
=
NULL
;
#if 0
if( !p_adec->format.p_data )
...
...
modules/codec/lpcm.c
View file @
f4bd2584
...
...
@@ -2,7 +2,7 @@
* lpcm.c: lpcm decoder module
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: lpcm.c,v 1.
2 2002/09/26 22:40:20
massiot Exp $
* $Id: lpcm.c,v 1.
3 2002/09/28 13:05:16
massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Henri Fallon <henri@videolan.org>
...
...
@@ -131,6 +131,7 @@ static int RunDecoder( decoder_fifo_t * p_fifo )
p_dec
->
output_format
.
i_rate
=
48000
;
aout_DateInit
(
&
p_dec
->
end_date
,
48000
);
p_dec
->
p_aout
=
NULL
;
p_dec
->
p_aout_input
=
aout_DecNew
(
p_dec
->
p_fifo
,
&
p_dec
->
p_aout
,
&
p_dec
->
output_format
);
...
...
modules/codec/mad/decoder.c
View file @
f4bd2584
...
...
@@ -190,7 +190,7 @@ static void EndThread (mad_adec_thread_t * p_dec)
/* If the audio output fifo was created, we destroy it */
if
(
p_dec
->
p_aout_input
!=
NULL
)
{
aout_
Input
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
aout_
Dec
Delete
(
p_dec
->
p_aout
,
p_dec
->
p_aout_input
);
}
/* mad_decoder_finish releases the memory allocated inside the struct */
...
...
src/audio_output/mixer.c
View file @
f4bd2584
...
...
@@ -2,7 +2,7 @@
* mixer.c : audio output mixing operations
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: mixer.c,v 1.1
6 2002/09/26 22:40:25
massiot Exp $
* $Id: mixer.c,v 1.1
7 2002/09/28 13:05:16
massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -74,7 +74,7 @@ int aout_MixerDelete( aout_instance_t * p_aout )
*****************************************************************************/
static
int
MixBuffer
(
aout_instance_t
*
p_aout
)
{
int
i
,
i_
nb_real_inputs
=
0
;
int
i
,
i_
first_input
=
0
;
aout_buffer_t
*
p_output_buffer
;
mtime_t
start_date
,
end_date
;
audio_date_t
exact_start_date
;
...
...
@@ -168,8 +168,11 @@ static int MixBuffer( aout_instance_t * p_aout )
mtime_t
prev_date
;
vlc_bool_t
b_drop_buffers
;
if
(
p_input
->
b_error
)
continue
;
i_nb_real_inputs
++
;
if
(
p_input
->
b_error
)
{
if
(
i_first_input
==
i
)
i_first_input
++
;
continue
;
}
p_buffer
=
p_fifo
->
p_first
;
if
(
p_buffer
==
NULL
)
...
...
@@ -268,7 +271,7 @@ static int MixBuffer( aout_instance_t * p_aout )
if
(
p_buffer
==
NULL
)
break
;
}
if
(
i
<
p_aout
->
i_nb_inputs
||
!
i_nb_real
_inputs
)
if
(
i
<
p_aout
->
i_nb_inputs
||
i_first_input
==
p_aout
->
i_nb
_inputs
)
{
/* Interrupted before the end... We can't run. */
vlc_mutex_unlock
(
&
p_aout
->
input_fifos_lock
);
...
...
@@ -281,7 +284,7 @@ static int MixBuffer( aout_instance_t * p_aout )
/
p_aout
->
output
.
output
.
i_rate
,
/* This is a bit kludgy, but is actually only used
* for the S/PDIF dummy mixer : */
p_aout
->
pp_inputs
[
0
]
->
fifo
.
p_first
,
p_aout
->
pp_inputs
[
i_first_input
]
->
fifo
.
p_first
,
p_output_buffer
);
if
(
p_output_buffer
==
NULL
)
{
...
...
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