Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b3a56e60
Commit
b3a56e60
authored
Mar 09, 2015
by
zhaoxiu.zeng
Committed by
Michael Niedermayer
Mar 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc_parser: use avpriv_find_start_code in hevc_split()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
1f4088b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
hevc_parser.c
libavcodec/hevc_parser.c
+8
-8
No files found.
libavcodec/hevc_parser.c
View file @
b3a56e60
...
@@ -286,22 +286,22 @@ static int hevc_parse(AVCodecParserContext *s,
...
@@ -286,22 +286,22 @@ static int hevc_parse(AVCodecParserContext *s,
// Split after the parameter sets at the beginning of the stream if they exist.
// Split after the parameter sets at the beginning of the stream if they exist.
static
int
hevc_split
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buf
,
int
buf_size
)
static
int
hevc_split
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buf
,
int
buf_size
)
{
{
int
i
;
const
uint8_t
*
ptr
=
buf
,
*
end
=
buf
+
buf_size
;
uint32_t
state
=
-
1
;
uint32_t
state
=
-
1
;
int
has_ps
=
0
;
int
has_ps
=
0
,
nut
;
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
while
(
ptr
<
end
)
{
state
=
(
state
<<
8
)
|
buf
[
i
];
ptr
=
avpriv_find_start_code
(
ptr
,
end
,
&
state
);
if
(((
state
>>
8
)
&
0xFFFFFF
)
==
START_CODE
)
{
if
((
state
>>
8
)
!=
START_CODE
)
int
nut
=
(
state
>>
1
)
&
0x3F
;
break
;
nut
=
(
state
>>
1
)
&
0x3F
;
if
(
nut
>=
NAL_VPS
&&
nut
<=
NAL_PPS
)
if
(
nut
>=
NAL_VPS
&&
nut
<=
NAL_PPS
)
has_ps
=
1
;
has_ps
=
1
;
else
if
(
has_ps
)
else
if
(
has_ps
)
return
i
-
3
;
return
ptr
-
4
-
buf
;
else
// no parameter set at the beginning of the stream
else
// no parameter set at the beginning of the stream
return
0
;
return
0
;
}
}
}
return
0
;
return
0
;
}
}
...
...
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