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
2d6a45c1
Commit
2d6a45c1
authored
Dec 03, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Silence warnings when decoding QNAP Systems H264 codec.
Fixes ticket #571.
parent
215b7724
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
h264.c
libavcodec/h264.c
+2
-1
h264_parser.c
libavcodec/h264_parser.c
+3
-0
No files found.
libavcodec/h264.c
View file @
2d6a45c1
...
...
@@ -4083,7 +4083,8 @@ static int decode_frame(AVCodecContext *avctx,
}
if
(
!
(
s
->
flags2
&
CODEC_FLAG2_CHUNKS
)
&&
!
s
->
current_picture_ptr
){
if
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
)
if
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
||
buf_size
>=
4
&&
!
memcmp
(
"Q264"
,
buf
,
4
))
return
0
;
av_log
(
avctx
,
AV_LOG_ERROR
,
"no frame!
\n
"
);
return
-
1
;
...
...
libavcodec/h264_parser.c
View file @
2d6a45c1
...
...
@@ -148,6 +148,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
unsigned
int
slice_type
;
int
state
=
-
1
;
const
uint8_t
*
ptr
;
int
q264
=
buf_size
>=
4
&&
!
memcmp
(
"Q264"
,
buf
,
4
);
/* set some sane default values */
s
->
pict_type
=
AV_PICTURE_TYPE_I
;
...
...
@@ -266,6 +267,8 @@ static inline int parse_nal_units(AVCodecParserContext *s,
}
buf
+=
consumed
;
}
if
(
q264
)
return
0
;
/* didn't find a picture! */
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"missing picture in access unit with size %d
\n
"
,
buf_size
);
return
-
1
;
...
...
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