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
48ea5433
Commit
48ea5433
authored
Jun 19, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/h264_parser: pass logctx to h264_find_frame_end()
This helps removing the H264Context from the H264ParseContext.
parent
0bf5fd2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
h264_parser.c
libavcodec/h264_parser.c
+5
-5
No files found.
libavcodec/h264_parser.c
View file @
48ea5433
...
...
@@ -59,7 +59,7 @@ typedef struct H264ParseContext {
static
int
h264_find_frame_end
(
H264ParseContext
*
p
,
const
uint8_t
*
buf
,
int
buf_size
)
int
buf_size
,
void
*
logctx
)
{
H264Context
*
h
=
&
p
->
h
;
int
i
,
j
;
...
...
@@ -73,7 +73,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
state
=
7
;
if
(
p
->
is_avc
&&
!
p
->
nal_length_size
)
av_log
(
h
->
av
ctx
,
AV_LOG_ERROR
,
"AVC-parser: nal length size invalid
\n
"
);
av_log
(
log
ctx
,
AV_LOG_ERROR
,
"AVC-parser: nal length size invalid
\n
"
);
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
if
(
i
>=
next_avc
)
{
...
...
@@ -82,7 +82,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
for
(
j
=
0
;
j
<
p
->
nal_length_size
;
j
++
)
nalsize
=
(
nalsize
<<
8
)
|
buf
[
i
++
];
if
(
nalsize
<=
0
||
nalsize
>
buf_size
-
i
)
{
av_log
(
h
->
av
ctx
,
AV_LOG_ERROR
,
"AVC-parser: nal size %d remaining %d
\n
"
,
nalsize
,
buf_size
-
i
);
av_log
(
log
ctx
,
AV_LOG_ERROR
,
"AVC-parser: nal size %d remaining %d
\n
"
,
nalsize
,
buf_size
-
i
);
return
buf_size
;
}
next_avc
=
i
+
nalsize
;
...
...
@@ -585,7 +585,7 @@ static int h264_parse(AVCodecParserContext *s,
if
(
s
->
flags
&
PARSER_FLAG_COMPLETE_FRAMES
)
{
next
=
buf_size
;
}
else
{
next
=
h264_find_frame_end
(
p
,
buf
,
buf_size
);
next
=
h264_find_frame_end
(
p
,
buf
,
buf_size
,
avctx
);
if
(
ff_combine_frame
(
pc
,
next
,
&
buf
,
&
buf_size
)
<
0
)
{
*
poutbuf
=
NULL
;
...
...
@@ -595,7 +595,7 @@ static int h264_parse(AVCodecParserContext *s,
if
(
next
<
0
&&
next
!=
END_NOT_FOUND
)
{
av_assert1
(
pc
->
last_index
+
next
>=
0
);
h264_find_frame_end
(
p
,
&
pc
->
buffer
[
pc
->
last_index
+
next
],
-
next
);
// update state
h264_find_frame_end
(
p
,
&
pc
->
buffer
[
pc
->
last_index
+
next
],
-
next
,
avctx
);
// update state
}
}
...
...
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