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
5bf2454e
Commit
5bf2454e
authored
Oct 01, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264dec: support broken files with mp4 extradata/annex b data
Bug-Id: 966
parent
2124711b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
h264dec.c
libavcodec/h264dec.c
+18
-1
No files found.
libavcodec/h264dec.c
View file @
5bf2454e
...
...
@@ -530,7 +530,24 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error splitting the input into NAL units.
\n
"
);
return
ret
;
/* There are samples in the wild with mp4-style extradata, but Annex B
* data in the packets. If we fail parsing the packet as mp4, try it again
* as Annex B. */
if
(
h
->
is_avc
&&
!
(
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
{
int
err
=
ff_h2645_packet_split
(
&
h
->
pkt
,
buf
,
buf_size
,
avctx
,
0
,
0
,
avctx
->
codec_id
);
if
(
err
>=
0
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"The stream seems to contain AVCC extradata with Annex B "
"formatted data, which is invalid."
);
h
->
is_avc
=
0
;
ret
=
0
;
}
}
if
(
ret
<
0
)
return
ret
;
}
if
(
avctx
->
active_thread_type
&
FF_THREAD_FRAME
)
...
...
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