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
3b3a2b33
Commit
3b3a2b33
authored
Dec 19, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LPCM: encode from S16N rather than S16B
parent
f9e094b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
modules/codec/lpcm.c
modules/codec/lpcm.c
+10
-2
No files found.
modules/codec/lpcm.c
View file @
3b3a2b33
...
...
@@ -37,6 +37,7 @@
#include <vlc_plugin.h>
#include <vlc_codec.h>
#include <vlc_aout.h>
#include <unistd.h>
#include <assert.h>
/*****************************************************************************
...
...
@@ -476,7 +477,7 @@ static int OpenEncoder( vlc_object_t *p_this )
p_enc
->
fmt_in
.
i_codec
=
p_enc
->
fmt_out
.
i_codec
;
p_enc
->
fmt_in
.
audio
.
i_bitspersample
=
16
;
p_enc
->
fmt_in
.
i_codec
=
VLC_CODEC_S16
B
;
p_enc
->
fmt_in
.
i_codec
=
VLC_CODEC_S16
N
;
p_enc
->
fmt_out
.
i_bitrate
=
p_enc
->
fmt_in
.
audio
.
i_channels
*
...
...
@@ -556,8 +557,15 @@ static block_t *EncodeFrames( encoder_t *p_enc, block_t *p_aout_buf )
const
int
i_kept_bytes
=
p_sys
->
i_buffer_used
*
p_sys
->
i_channels
*
2
;
const
int
i_consume_bytes
=
i_consume_samples
*
p_sys
->
i_channels
*
2
;
#ifdef WORDS_BIGENDIAN
memcpy
(
frame
+
6
,
p_sys
->
p_buffer
,
i_kept_bytes
);
memcpy
(
frame
+
6
+
i_kept_bytes
,
p_aout_buf
->
p_buffer
+
i_bytes_consumed
,
i_consume_bytes
);
memcpy
(
frame
+
6
+
i_kept_bytes
,
p_aout_buf
->
p_buffer
+
i_bytes_consumed
,
i_consume_bytes
);
#else
swab
(
p_sys
->
p_buffer
,
frame
+
6
,
i_kept_bytes
);
swab
(
p_aout_buf
->
p_buffer
+
i_bytes_consumed
,
frame
+
6
+
i_kept_bytes
,
i_consume_bytes
);
#endif
p_sys
->
i_frame_num
++
;
p_sys
->
i_buffer_used
=
0
;
...
...
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