Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1f7b67a1
Commit
1f7b67a1
authored
May 31, 2016
by
foo86
Committed by
James Almer
May 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dca_parser: simplify state machine
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
054a2c9f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
dca_parser.c
libavcodec/dca_parser.c
+15
-19
No files found.
libavcodec/dca_parser.c
View file @
1f7b67a1
...
...
@@ -109,25 +109,25 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
case
DCA_SYNCWORD_CORE_LE
:
if
(
size
==
2
)
{
pc1
->
framesize
=
CORE_FRAMESIZE
(
STATE_LE
(
state
));
start_found
=
2
;
start_found
=
4
;
}
break
;
case
DCA_SYNCWORD_CORE_14B_BE
:
if
(
size
==
4
)
{
pc1
->
framesize
=
CORE_FRAMESIZE
(
STATE_14
(
state
))
*
8
/
14
*
2
;
start_found
=
2
;
start_found
=
4
;
}
break
;
case
DCA_SYNCWORD_CORE_14B_LE
:
if
(
size
==
4
)
{
pc1
->
framesize
=
CORE_FRAMESIZE
(
STATE_14
(
STATE_LE
(
state
)))
*
8
/
14
*
2
;
start_found
=
2
;
start_found
=
4
;
}
break
;
case
DCA_SYNCWORD_SUBSTREAM
:
if
(
size
==
6
)
{
pc1
->
framesize
=
EXSS_FRAMESIZE
(
state
);
start_found
=
2
;
start_found
=
4
;
}
break
;
default:
...
...
@@ -136,11 +136,8 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
continue
;
}
if
(
pc1
->
lastmarker
==
DCA_SYNCWORD_CORE_BE
)
{
if
(
pc1
->
framesize
>
size
+
2
)
continue
;
if
(
start_found
==
2
&&
IS_EXSS_MARKER
(
state
))
{
if
(
start_found
==
2
&&
IS_EXSS_MARKER
(
state
)
&&
pc1
->
framesize
<=
size
+
2
)
{
pc1
->
framesize
=
size
+
2
;
start_found
=
3
;
continue
;
...
...
@@ -153,7 +150,6 @@ static int dca_find_frame_end(DCAParseContext *pc1, const uint8_t *buf,
}
continue
;
}
}
if
(
pc1
->
framesize
>
size
)
continue
;
...
...
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