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
99321d1b
Commit
99321d1b
authored
Dec 18, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: merge old and new "slice in extradata" checks
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
09b4ae83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
h264.c
libavcodec/h264.c
+6
-14
No files found.
libavcodec/h264.c
View file @
99321d1b
...
...
@@ -3924,20 +3924,10 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size,
continue
;
again:
/* Ignore
every NAL unit type except PPS and SPS
during extradata
/* Ignore
per frame NAL unit type
during extradata
* parsing. Decoding slices is not possible in codec init
* with frame-mt */
if
(
parse_extradata
&&
HAVE_THREADS
&&
(
s
->
avctx
->
active_thread_type
&
FF_THREAD_FRAME
)
&&
(
hx
->
nal_unit_type
!=
NAL_PPS
&&
hx
->
nal_unit_type
!=
NAL_SPS
))
{
av_log
(
avctx
,
AV_LOG_INFO
,
"Ignoring NAL unit %d during "
"extradata parsing
\n
"
,
hx
->
nal_unit_type
);
hx
->
nal_unit_type
=
NAL_FF_IGNORE
;
}
err
=
0
;
if
(
h
->
decoding_extradata
)
{
if
(
parse_extradata
)
{
switch
(
hx
->
nal_unit_type
)
{
case
NAL_IDR_SLICE
:
case
NAL_SLICE
:
...
...
@@ -3945,11 +3935,13 @@ again:
case
NAL_DPB
:
case
NAL_DPC
:
case
NAL_AUXILIARY_SLICE
:
av_log
(
h
->
s
.
avctx
,
AV_LOG_WARNING
,
"Ignoring NAL %d in global header
\n
"
,
hx
->
nal_unit_type
);
hx
->
nal_unit_type
=
NAL_F
ILLER_DATA
;
av_log
(
h
->
s
.
avctx
,
AV_LOG_WARNING
,
"Ignoring NAL %d in global header
/extradata
\n
"
,
hx
->
nal_unit_type
);
hx
->
nal_unit_type
=
NAL_F
F_IGNORE
;
}
}
err
=
0
;
switch
(
hx
->
nal_unit_type
)
{
case
NAL_IDR_SLICE
:
if
(
first_slice
!=
NAL_IDR_SLICE
)
{
...
...
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