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
cf57335c
Commit
cf57335c
authored
Nov 01, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* araw: mhh, aout_buffer_t.i_nb_samples is samples _per_ channels...
parent
b780be34
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
modules/codec/araw.c
modules/codec/araw.c
+7
-8
No files found.
modules/codec/araw.c
View file @
cf57335c
...
...
@@ -2,7 +2,7 @@
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: araw.c,v 1.
19 2003/11/01 06:27:45
fenrir Exp $
* $Id: araw.c,v 1.
20 2003/11/01 06:56:29
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -607,7 +607,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
}
else
if
(
p_enc
->
i_fourcc
==
VLC_FOURCC
(
'u'
,
'8'
,
' '
,
' '
)
)
{
if
(
(
p_block
=
block_New
(
p_enc
,
p_aout_buf
->
i_nb_
samples
)
)
)
if
(
(
p_block
=
block_New
(
p_enc
,
p_aout_buf
->
i_nb_
bytes
/
2
)
)
)
{
uint8_t
*
p_dst
=
(
uint8_t
*
)
p_block
->
p_buffer
;
int8_t
*
p_src
=
(
int8_t
*
)
p_aout_buf
->
p_buffer
;
...
...
@@ -617,7 +617,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
p_src
++
;
}
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
samples
;
i
++
)
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
bytes
/
2
;
i
++
)
{
*
p_dst
++
=
*
p_src
+
128
;
p_src
+=
2
;
}
...
...
@@ -625,7 +625,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
}
else
if
(
p_enc
->
i_fourcc
==
VLC_FOURCC
(
's'
,
'8'
,
' '
,
' '
)
)
{
if
(
(
p_block
=
block_New
(
p_enc
,
p_aout_buf
->
i_nb_
samples
)
)
)
if
(
(
p_block
=
block_New
(
p_enc
,
p_aout_buf
->
i_nb_
bytes
/
2
)
)
)
{
int8_t
*
p_dst
=
(
int8_t
*
)
p_block
->
p_buffer
;
int8_t
*
p_src
=
(
int8_t
*
)
p_aout_buf
->
p_buffer
;
...
...
@@ -635,7 +635,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
p_src
++
;
}
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
samples
;
i
++
)
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
bytes
/
2
;
i
++
)
{
*
p_dst
++
=
*
p_src
;
p_src
+=
2
;
}
...
...
@@ -649,7 +649,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
uint8_t
*
p_dst
=
(
uint8_t
*
)
p_block
->
p_buffer
;
uint8_t
*
p_src
=
(
uint8_t
*
)
p_aout_buf
->
p_buffer
;
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
samples
;
i
++
)
for
(
i
=
0
;
i
<
p_aout_buf
->
i_nb_
bytes
/
2
;
i
++
)
{
p_dst
[
0
]
=
p_src
[
1
];
p_dst
[
1
]
=
p_src
[
0
];
...
...
@@ -664,8 +664,7 @@ static block_t *EncoderEncode( encoder_t *p_enc, aout_buffer_t *p_aout_buf )
{
p_block
->
i_dts
=
p_block
->
i_pts
=
p_aout_buf
->
start_date
;
p_block
->
i_length
=
(
int64_t
)
p_aout_buf
->
i_nb_samples
*
(
int64_t
)
1000000
/
p_enc
->
format
.
audio
.
i_rate
/
aout_FormatNbChannels
(
&
p_enc
->
format
.
audio
);
p_enc
->
format
.
audio
.
i_rate
;
}
return
p_block
;
...
...
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