Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f8efac2e
Commit
f8efac2e
authored
Feb 18, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* transcode: fixed s16b <-> s16l conversion.
parent
ff7206fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
22 deletions
+14
-22
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+14
-22
No files found.
modules/stream_out/transcode.c
View file @
f8efac2e
...
...
@@ -2,7 +2,7 @@
* transcode.c: transcoding stream output module
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id: transcode.c,v 1.7
4 2004/02/12 23:51:15 gbazin
Exp $
* $Id: transcode.c,v 1.7
5 2004/02/18 13:21:33 fenrir
Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -833,38 +833,30 @@ static int transcode_audio_ffmpeg_process( sout_stream_t *p_stream,
int16_t
*
sin
=
(
int16_t
*
)
p_buffer
;
int
i_used
=
__MIN
(
id
->
i_buffer
,
i_buffer
);
int
i_samples
=
i_used
/
2
;
int
b_invert_indianness
;
if
(
id
->
f_src
.
i_codec
==
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
)
)
#ifdef WORDS_BIGENDIAN
b_invert_indianness
=
1
;
#else
b_invert_indianness
=
0
;
#endif
else
/* first copy */
memcpy
(
sout
,
sin
,
i_used
);
#ifdef WORDS_BIGENDIAN
b_invert_indianness
=
0
;
if
(
id
->
f_src
.
i_codec
==
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'l'
)
)
#else
b_invert_indianness
=
1
;
if
(
id
->
f_src
.
i_codec
==
VLC_FOURCC
(
's'
,
'1'
,
'6'
,
'b'
)
)
#endif
if
(
b_invert_indianness
)
{
uint8_t
*
dat
=
(
uint8_t
*
)
sout
;
while
(
i_samples
>
0
)
{
uint8_t
tmp
[
2
];
uint8_t
tmp
;
tmp
=
dat
[
0
];
dat
[
0
]
=
dat
[
1
];
dat
[
1
]
=
tmp
;
dat
+=
2
;
tmp
[
1
]
=
*
sin
++
;
tmp
[
0
]
=
*
sin
++
;
*
sout
++
=
*
(
int16_t
*
)
tmp
;
i_samples
--
;
}
}
else
{
memcpy
(
sout
,
sin
,
i_used
);
sout
+=
i_samples
;
}
i_buffer
-=
i_used
;
p_buffer
+=
i_used
;
...
...
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