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
5f3c2d34
Commit
5f3c2d34
authored
Oct 20, 2002
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* all: fix for correct "i_channels" use.
parent
cada6d07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
modules/codec/araw.c
modules/codec/araw.c
+21
-2
modules/codec/faad/decoder.c
modules/codec/faad/decoder.c
+5
-3
modules/codec/faad/decoder.h
modules/codec/faad/decoder.h
+8
-1
No files found.
modules/codec/araw.c
View file @
5f3c2d34
...
...
@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: araw.c,v 1.
1 2002/10/14 21:59:44
fenrir Exp $
* $Id: araw.c,v 1.
2 2002/10/20 17:44:17
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -84,6 +84,15 @@ vlc_module_begin();
set_callbacks
(
OpenDecoder
,
NULL
);
vlc_module_end
();
static
int
i_channels_maps
[
6
]
=
{
0
,
AOUT_CHAN_MONO
,
AOUT_CHAN_STEREO
,
AOUT_CHAN_3F
,
AOUT_CHAN_2F2R
,
AOUT_CHAN_3F2R
};
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
*****************************************************************************
...
...
@@ -223,9 +232,11 @@ static int PESGetSize( pes_packet_t *p_pes )
return
(
i_size
);
}
/*****************************************************************************
* InitThread: initialize data before entering main loop
*****************************************************************************/
static
int
InitThread
(
adec_thread_t
*
p_adec
)
{
...
...
@@ -271,7 +282,15 @@ static int InitThread( adec_thread_t * p_adec )
return
(
-
1
);
}
p_adec
->
output_format
.
i_rate
=
p_adec
->
format
.
i_samplespersec
;
p_adec
->
output_format
.
i_channels
=
p_adec
->
format
.
i_channels
;
if
(
p_adec
->
output_format
.
i_channels
<=
0
||
p_adec
->
output_format
.
i_channels
>
5
)
{
msg_Err
(
p_adec
->
p_fifo
,
"bad channels count(1-5)"
);
return
(
-
1
);
}
p_adec
->
output_format
.
i_channels
=
i_channels_maps
[
p_adec
->
format
.
i_channels
];
p_adec
->
p_aout
=
NULL
;
p_adec
->
p_aout_input
=
NULL
;
...
...
modules/codec/faad/decoder.c
View file @
5f3c2d34
...
...
@@ -2,7 +2,7 @@
* decoder.c: AAC decoder using libfaad2
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: decoder.c,v 1.
5 2002/09/30 21:32:32 massiot
Exp $
* $Id: decoder.c,v 1.
6 2002/10/20 17:44:17 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -420,7 +420,8 @@ static void DecodeThread( adec_thread_t *p_adec )
return
;
}
if
(
(
faad_frame
.
channels
<=
0
)
||
(
faad_frame
.
channels
>
AAC_MAXCHANNELS
)
)
(
faad_frame
.
channels
>
AAC_MAXCHANNELS
)
||
(
faad_frame
.
channels
>
5
)
)
{
msg_Warn
(
p_adec
->
p_fifo
,
"invalid channels count(%d)"
,
faad_frame
.
channels
);
...
...
@@ -453,7 +454,8 @@ static void DecodeThread( adec_thread_t *p_adec )
}
/* **** Create a new audio output **** */
p_adec
->
output_format
.
i_channels
=
faad_frame
.
channels
;
p_adec
->
output_format
.
i_channels
=
i_channels_maps
[
faad_frame
.
channels
];
aout_DateInit
(
&
p_adec
->
date
,
p_adec
->
output_format
.
i_rate
);
p_adec
->
p_aout_input
=
aout_DecNew
(
p_adec
->
p_fifo
,
&
p_adec
->
p_aout
,
...
...
modules/codec/faad/decoder.h
View file @
5f3c2d34
...
...
@@ -3,7 +3,7 @@
*
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: decoder.h,v 1.
2 2002/08/23 14:05:22 sam
Exp $
* $Id: decoder.h,v 1.
3 2002/10/20 17:44:17 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -72,5 +72,12 @@ typedef struct adec_thread_s
}
adec_thread_t
;
static
int
i_channels_maps
[
6
]
=
{
0
,
AOUT_CHAN_MONO
,
AOUT_CHAN_STEREO
,
AOUT_CHAN_3F
,
AOUT_CHAN_2F2R
,
AOUT_CHAN_3F2R
};
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