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
623dd6d8
Commit
623dd6d8
authored
Feb 08, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/audio_filter/converter/dtstospdif.c: only swab big endian bitstreams.
parent
0a743910
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
modules/audio_filter/converter/dtstospdif.c
modules/audio_filter/converter/dtstospdif.c
+20
-12
No files found.
modules/audio_filter/converter/dtstospdif.c
View file @
623dd6d8
...
...
@@ -2,7 +2,7 @@
* dtstospdif.c : encapsulates DTS frames into S/PDIF packets
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: dtstospdif.c,v 1.
5 2004/02/07 15:01:07 sigmunau
Exp $
* $Id: dtstospdif.c,v 1.
6 2004/02/08 00:04:16 gbazin
Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
...
...
@@ -151,10 +151,6 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
for
(
i_frame
=
0
;
i_frame
<
3
;
i_frame
++
)
{
#ifndef HAVE_SWAB
uint16_t
i
;
byte_t
*
p_tmp
;
#endif
byte_t
*
p_out
=
p_out_buf
->
p_buffer
+
(
i_frame
*
i_fz
);
byte_t
*
p_in
=
p_filter
->
p_sys
->
p_buf
+
(
i_frame
*
i_length
);
...
...
@@ -171,17 +167,29 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
*
(
p_out
+
6
)
=
(
i_length
*
8
)
&
0xff
;
*
(
p_out
+
7
)
=
(
i_length
*
8
)
>>
8
;
if
(
p_in
[
0
]
==
0x1f
||
p_in
[
0
]
==
0x7f
)
{
/* We are dealing with a big endian bitstream.
* Convert to little endian */
#ifdef HAVE_SWAB
swab
(
p_in
,
p_out
+
8
,
i_length
);
swab
(
p_in
,
p_out
+
8
,
i_length
);
#else
p_tmp
=
p_out
+
8
;
for
(
i
=
i_length
/
2
;
i
--
;
)
uint16_t
i
;
byte_t
*
p_tmp
;
p_tmp
=
p_out
+
8
;
for
(
i
=
i_length
/
2
;
i
--
;
)
{
p_tmp
[
0
]
=
p_in
[
1
];
p_tmp
[
1
]
=
p_in
[
0
];
p_tmp
+=
2
;
p_in
+=
2
;
}
#endif
}
else
{
p_tmp
[
0
]
=
p_in
[
1
];
p_tmp
[
1
]
=
p_in
[
0
];
p_tmp
+=
2
;
p_in
+=
2
;
/* Little endian */
memcpy
(
p_in
,
p_out
+
8
,
i_length
);
}
#endif
if
(
i_fz
>
i_length
+
8
)
{
...
...
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