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
89646284
Commit
89646284
authored
Nov 08, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AAC packetizer: deindent state machine switch
parent
7e52cd8a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
127 additions
and
137 deletions
+127
-137
modules/packetizer/mpeg4audio.c
modules/packetizer/mpeg4audio.c
+127
-137
No files found.
modules/packetizer/mpeg4audio.c
View file @
89646284
...
@@ -895,15 +895,9 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
...
@@ -895,15 +895,9 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
block_BytestreamPush
(
&
p_sys
->
bytestream
,
*
pp_block
);
block_BytestreamPush
(
&
p_sys
->
bytestream
,
*
pp_block
);
for
(;;)
for
(;;)
switch
(
p_sys
->
i_state
)
{
{
switch
(
p_sys
->
i_state
)
{
case
STATE_NOSYNC
:
case
STATE_NOSYNC
:
while
(
block_PeekBytes
(
&
p_sys
->
bytestream
,
p_header
,
2
)
while
(
block_PeekBytes
(
&
p_sys
->
bytestream
,
p_header
,
2
)
==
VLC_SUCCESS
)
{
==
VLC_SUCCESS
)
{
/* Look for sync word - should be 0xfff(adts) or 0x2b7(loas) */
/* Look for sync word - should be 0xfff(adts) or 0x2b7(loas) */
if
(
p_header
[
0
]
==
0xff
&&
(
p_header
[
1
]
&
0xf6
)
==
0xf0
)
{
if
(
p_header
[
0
]
==
0xff
&&
(
p_header
[
1
]
&
0xf6
)
==
0xf0
)
{
if
(
p_sys
->
i_type
!=
TYPE_ADTS
)
if
(
p_sys
->
i_type
!=
TYPE_ADTS
)
...
@@ -1022,13 +1016,10 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
...
@@ -1022,13 +1016,10 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
/* Skip the ADTS/LOAS header */
/* Skip the ADTS/LOAS header */
block_SkipBytes
(
&
p_sys
->
bytestream
,
p_sys
->
i_header_size
);
block_SkipBytes
(
&
p_sys
->
bytestream
,
p_sys
->
i_header_size
);
if
(
p_sys
->
i_type
==
TYPE_ADTS
)
{
/* Copy the whole frame into the buffer */
/* Copy the whole frame into the buffer */
block_GetBytes
(
&
p_sys
->
bytestream
,
p_buf
,
p_sys
->
i_frame_size
);
block_GetBytes
(
&
p_sys
->
bytestream
,
p_buf
,
p_sys
->
i_frame_size
);
}
else
{
if
(
p_sys
->
i_type
!=
TYPE_ADTS
)
{
/* parse/extract the whole frame */
assert
(
p_sys
->
i_type
==
TYPE_LOAS
);
assert
(
p_sys
->
i_type
==
TYPE_LOAS
);
/* Copy the whole frame into the buffer and parse/extract it */
block_GetBytes
(
&
p_sys
->
bytestream
,
p_buf
,
p_sys
->
i_frame_size
);
p_out_buffer
->
i_buffer
=
LOASParse
(
p_dec
,
p_buf
,
p_sys
->
i_frame_size
);
p_out_buffer
->
i_buffer
=
LOASParse
(
p_dec
,
p_buf
,
p_sys
->
i_frame_size
);
if
(
p_out_buffer
->
i_buffer
<=
0
)
{
if
(
p_out_buffer
->
i_buffer
<=
0
)
{
if
(
!
p_sys
->
b_latm_cfg
)
if
(
!
p_sys
->
b_latm_cfg
)
...
@@ -1052,7 +1043,6 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
...
@@ -1052,7 +1043,6 @@ static block_t *PacketizeStreamBlock(decoder_t *p_dec, block_t **pp_block)
return
p_out_buffer
;
return
p_out_buffer
;
}
}
}
return
NULL
;
return
NULL
;
}
}
...
...
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