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
724e6b3d
Commit
724e6b3d
authored
Jan 26, 2020
by
Gyan Doshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/yuv4mpegdec: better error logging
parent
609dfb40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
yuv4mpegdec.c
libavformat/yuv4mpegdec.c
+8
-4
No files found.
libavformat/yuv4mpegdec.c
View file @
724e6b3d
...
...
@@ -53,10 +53,14 @@ static int yuv4_read_header(AVFormatContext *s)
break
;
}
}
if
(
i
==
MAX_YUV4_HEADER
)
return
-
1
;
if
(
strncmp
(
header
,
Y4M_MAGIC
,
strlen
(
Y4M_MAGIC
)))
return
-
1
;
if
(
i
==
MAX_YUV4_HEADER
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Header too large.
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
strncmp
(
header
,
Y4M_MAGIC
,
strlen
(
Y4M_MAGIC
)))
{
av_log
(
s
,
AV_LOG_ERROR
,
"Invalid magic number for yuv4mpeg.
\n
"
);
return
AVERROR
(
EINVAL
);
}
header_end
=
&
header
[
i
+
1
];
// Include space
for
(
tokstart
=
&
header
[
strlen
(
Y4M_MAGIC
)
+
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