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
ede6e749
Commit
ede6e749
authored
Jan 19, 2018
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mlp_parser: reindent after last commit
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
55ebf707
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
46 deletions
+46
-46
mlp_parser.c
libavcodec/mlp_parser.c
+46
-46
No files found.
libavcodec/mlp_parser.c
View file @
ede6e749
...
...
@@ -259,65 +259,65 @@ static int mlp_parse(AVCodecParserContext *s,
if
(
s
->
flags
&
PARSER_FLAG_COMPLETE_FRAMES
)
{
next
=
buf_size
;
}
else
{
if
(
!
mp
->
in_sync
)
{
// Not in sync - find a major sync header
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
mp
->
pc
.
state
=
(
mp
->
pc
.
state
<<
8
)
|
buf
[
i
];
if
((
mp
->
pc
.
state
&
0xfffffffe
)
==
0xf8726fba
&&
// ignore if we do not have the data for the start of header
mp
->
pc
.
index
+
i
>=
7
)
{
mp
->
in_sync
=
1
;
mp
->
bytes_left
=
0
;
break
;
if
(
!
mp
->
in_sync
)
{
// Not in sync - find a major sync header
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
mp
->
pc
.
state
=
(
mp
->
pc
.
state
<<
8
)
|
buf
[
i
];
if
((
mp
->
pc
.
state
&
0xfffffffe
)
==
0xf8726fba
&&
// ignore if we do not have the data for the start of header
mp
->
pc
.
index
+
i
>=
7
)
{
mp
->
in_sync
=
1
;
mp
->
bytes_left
=
0
;
break
;
}
}
}
if
(
!
mp
->
in_sync
)
{
if
(
ff_combine_frame
(
&
mp
->
pc
,
END_NOT_FOUND
,
&
buf
,
&
buf_size
)
!=
-
1
)
if
(
!
mp
->
in_sync
)
{
if
(
ff_combine_frame
(
&
mp
->
pc
,
END_NOT_FOUND
,
&
buf
,
&
buf_size
)
!=
-
1
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"ff_combine_frame failed
\n
"
);
return
buf_size
;
}
if
((
ret
=
ff_combine_frame
(
&
mp
->
pc
,
i
-
7
,
&
buf
,
&
buf_size
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"ff_combine_frame failed
\n
"
);
return
buf_size
;
}
return
ret
;
}
if
((
ret
=
ff_combine_frame
(
&
mp
->
pc
,
i
-
7
,
&
buf
,
&
buf_size
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"ff_combine_frame failed
\n
"
);
return
ret
;
return
i
-
7
;
}
return
i
-
7
;
}
if
(
mp
->
bytes_left
==
0
)
{
// Find length of this packet
if
(
mp
->
bytes_left
==
0
)
{
// Find length of this packet
/* Copy overread bytes from last frame into buffer. */
for
(;
mp
->
pc
.
overread
>
0
;
mp
->
pc
.
overread
--
)
{
mp
->
pc
.
buffer
[
mp
->
pc
.
index
++
]
=
mp
->
pc
.
buffer
[
mp
->
pc
.
overread_index
++
];
}
/* Copy overread bytes from last frame into buffer. */
for
(;
mp
->
pc
.
overread
>
0
;
mp
->
pc
.
overread
--
)
{
mp
->
pc
.
buffer
[
mp
->
pc
.
index
++
]
=
mp
->
pc
.
buffer
[
mp
->
pc
.
overread_index
++
];
}
if
(
mp
->
pc
.
index
+
buf_size
<
2
)
{
if
(
ff_combine_frame
(
&
mp
->
pc
,
END_NOT_FOUND
,
&
buf
,
&
buf_size
)
!=
-
1
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"ff_combine_frame failed
\n
"
);
return
buf_size
;
}
if
(
mp
->
pc
.
index
+
buf_size
<
2
)
{
if
(
ff_combine_frame
(
&
mp
->
pc
,
END_NOT_FOUND
,
&
buf
,
&
buf_size
)
!=
-
1
)
av_log
(
avctx
,
AV_LOG_WARNING
,
"ff_combine_frame failed
\n
"
);
return
buf_size
;
}
mp
->
bytes_left
=
((
mp
->
pc
.
index
>
0
?
mp
->
pc
.
buffer
[
0
]
:
buf
[
0
])
<<
8
)
|
(
mp
->
pc
.
index
>
1
?
mp
->
pc
.
buffer
[
1
]
:
buf
[
1
-
mp
->
pc
.
index
]);
mp
->
bytes_left
=
(
mp
->
bytes_left
&
0xfff
)
*
2
;
if
(
mp
->
bytes_left
<=
0
)
{
// prevent infinite loop
goto
lost_sync
;
mp
->
bytes_left
=
((
mp
->
pc
.
index
>
0
?
mp
->
pc
.
buffer
[
0
]
:
buf
[
0
])
<<
8
)
|
(
mp
->
pc
.
index
>
1
?
mp
->
pc
.
buffer
[
1
]
:
buf
[
1
-
mp
->
pc
.
index
]);
mp
->
bytes_left
=
(
mp
->
bytes_left
&
0xfff
)
*
2
;
if
(
mp
->
bytes_left
<=
0
)
{
// prevent infinite loop
goto
lost_sync
;
}
mp
->
bytes_left
-=
mp
->
pc
.
index
;
}
mp
->
bytes_left
-=
mp
->
pc
.
index
;
}
next
=
(
mp
->
bytes_left
>
buf_size
)
?
END_NOT_FOUND
:
mp
->
bytes_left
;
next
=
(
mp
->
bytes_left
>
buf_size
)
?
END_NOT_FOUND
:
mp
->
bytes_left
;
if
(
ff_combine_frame
(
&
mp
->
pc
,
next
,
&
buf
,
&
buf_size
)
<
0
)
{
mp
->
bytes_left
-=
buf_size
;
return
buf_size
;
}
if
(
ff_combine_frame
(
&
mp
->
pc
,
next
,
&
buf
,
&
buf_size
)
<
0
)
{
mp
->
bytes_left
-=
buf_size
;
return
buf_size
;
}
mp
->
bytes_left
=
0
;
mp
->
bytes_left
=
0
;
}
sync_present
=
(
AV_RB32
(
buf
+
4
)
&
0xfffffffe
)
==
0xf8726fba
;
...
...
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