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
a4755df5
Commit
a4755df5
authored
Dec 15, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: fix midstream extardata handling with dump.f4v
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
484b1cdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
h264.c
libavcodec/h264.c
+21
-1
No files found.
libavcodec/h264.c
View file @
a4755df5
...
@@ -4075,8 +4075,28 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -4075,8 +4075,28 @@ static int decode_frame(AVCodecContext *avctx,
return
0
;
return
0
;
}
}
if
(
h
->
is_avc
&&
buf_size
>=
9
&&
AV_RB32
(
buf
)
==
0x0164001F
&&
buf
[
5
]
&&
buf
[
8
]
==
0x67
)
if
(
h
->
is_avc
&&
buf_size
>=
9
&&
buf
[
0
]
==
1
&&
buf
[
2
]
==
0
&&
(
buf
[
4
]
&
0xFC
)
==
0xFC
&&
(
buf
[
5
]
&
0x1F
)
&&
buf
[
8
]
==
0x67
){
int
cnt
=
buf
[
5
]
&
0x1f
;
uint8_t
*
p
=
buf
+
6
;
while
(
cnt
--
){
int
nalsize
=
AV_RB16
(
p
)
+
2
;
if
(
nalsize
>
buf_size
-
(
p
-
buf
)
||
p
[
2
]
!=
0x67
)
goto
not_extra
;
p
+=
nalsize
;
}
cnt
=
*
(
p
++
);
if
(
!
cnt
)
goto
not_extra
;
while
(
cnt
--
){
int
nalsize
=
AV_RB16
(
p
)
+
2
;
if
(
nalsize
>
buf_size
-
(
p
-
buf
)
||
p
[
2
]
!=
0x68
)
goto
not_extra
;
p
+=
nalsize
;
}
return
ff_h264_decode_extradata
(
h
,
buf
,
buf_size
);
return
ff_h264_decode_extradata
(
h
,
buf
,
buf_size
);
}
not_extra
:
buf_index
=
decode_nal_units
(
h
,
buf
,
buf_size
);
buf_index
=
decode_nal_units
(
h
,
buf
,
buf_size
);
if
(
buf_index
<
0
)
if
(
buf_index
<
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