Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
95466992
Commit
95466992
authored
Mar 11, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Clean up. (Sigmund, does it work ?).
parent
097b76d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
modules/codec/araw.c
modules/codec/araw.c
+12
-10
No files found.
modules/codec/araw.c
View file @
95466992
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* Copyright (C) 2001, 2002 VideoLAN
* $Id: araw.c,v 1.1
3 2003/03/11 06:58:06
fenrir Exp $
* $Id: araw.c,v 1.1
4 2003/03/11 17:40:40
fenrir Exp $
*
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
*
...
@@ -433,7 +433,7 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -433,7 +433,7 @@ static void DecodeThread( adec_thread_t *p_adec )
aout_buffer_t
*
p_aout_buffer
;
aout_buffer_t
*
p_aout_buffer
;
int
i_samples
;
// per channels
int
i_samples
;
// per channels
int
i_size
;
int
i_size
;
uint8_t
*
p_data
;
uint8_t
*
p_data
,
*
p
;
pes_packet_t
*
p_pes
;
pes_packet_t
*
p_pes
;
/* **** get samples count **** */
/* **** get samples count **** */
...
@@ -449,13 +449,12 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -449,13 +449,12 @@ static void DecodeThread( adec_thread_t *p_adec )
{
{
i_size
-=
i_size
%
p_adec
->
p_wf
->
nBlockAlign
;
i_size
-=
i_size
%
p_adec
->
p_wf
->
nBlockAlign
;
}
}
i_size
=
__MAX
(
i_size
,
p_adec
->
p_wf
->
nBlockAlign
);
if
(
i_size
<=
0
||
i_size
<
p_adec
->
p_wf
->
nBlockAlign
)
if
(
!
i_size
||
!
p_pes
)
{
{
msg_Err
(
p_adec
->
p_fifo
,
"infinite loop..."
);
input_DeletePES
(
p_adec
->
p_fifo
->
p_packets_mgt
,
p_pes
);
return
;
return
;
}
}
i_samples
=
i_size
/
i_samples
=
i_size
/
(
(
p_adec
->
p_wf
->
wBitsPerSample
+
7
)
/
8
)
/
(
(
p_adec
->
p_wf
->
wBitsPerSample
+
7
)
/
8
)
/
p_adec
->
p_wf
->
nChannels
;
p_adec
->
p_wf
->
nChannels
;
...
@@ -475,7 +474,7 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -475,7 +474,7 @@ static void DecodeThread( adec_thread_t *p_adec )
}
}
/* gather data */
/* gather data */
p
_data
=
alloca
(
i_size
);
p
=
p_data
=
malloc
(
i_size
);
GetPESData
(
p_data
,
i_size
,
p_pes
);
GetPESData
(
p_data
,
i_size
,
p_pes
);
while
(
i_samples
>
0
)
while
(
i_samples
>
0
)
...
@@ -490,6 +489,8 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -490,6 +489,8 @@ static void DecodeThread( adec_thread_t *p_adec )
{
{
msg_Err
(
p_adec
->
p_fifo
,
"cannot get aout buffer"
);
msg_Err
(
p_adec
->
p_fifo
,
"cannot get aout buffer"
);
p_adec
->
p_fifo
->
b_error
=
1
;
p_adec
->
p_fifo
->
b_error
=
1
;
free
(
p_data
);
return
;
return
;
}
}
...
@@ -505,16 +506,16 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -505,16 +506,16 @@ static void DecodeThread( adec_thread_t *p_adec )
for
(
i
=
0
;
i
<
p_aout_buffer
->
i_nb_bytes
;
i
++
)
for
(
i
=
0
;
i
<
p_aout_buffer
->
i_nb_bytes
;
i
++
)
{
{
*
s
++
=
p_adec
->
p_logtos16
[
*
p
_data
++
];
*
s
++
=
p_adec
->
p_logtos16
[
*
p
++
];
}
}
}
}
else
else
{
{
memcpy
(
p_aout_buffer
->
p_buffer
,
memcpy
(
p_aout_buffer
->
p_buffer
,
p
_data
,
p
,
p_aout_buffer
->
i_nb_bytes
);
p_aout_buffer
->
i_nb_bytes
);
p
_data
+=
p_aout_buffer
->
i_nb_bytes
;
p
+=
p_aout_buffer
->
i_nb_bytes
;
}
}
aout_DecPlay
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
aout_DecPlay
(
p_adec
->
p_aout
,
p_adec
->
p_aout_input
,
p_aout_buffer
);
...
@@ -522,6 +523,7 @@ static void DecodeThread( adec_thread_t *p_adec )
...
@@ -522,6 +523,7 @@ static void DecodeThread( adec_thread_t *p_adec )
i_samples
-=
i_copy
;
i_samples
-=
i_copy
;
}
}
free
(
p_data
);
input_DeletePES
(
p_adec
->
p_fifo
->
p_packets_mgt
,
p_pes
);
input_DeletePES
(
p_adec
->
p_fifo
->
p_packets_mgt
,
p_pes
);
}
}
...
...
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