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
49dc82ee
Commit
49dc82ee
authored
Jan 08, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v4l2: do not assert on a value received from outside of Libav
parent
838b849e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
v4l2.c
libavdevice/v4l2.c
+6
-1
No files found.
libavdevice/v4l2.c
View file @
49dc82ee
...
@@ -460,7 +460,12 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
...
@@ -460,7 +460,12 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
return
AVERROR
(
errno
);
return
AVERROR
(
errno
);
}
}
assert
(
buf
.
index
<
s
->
buffers
);
if
(
buf
.
index
>=
s
->
buffers
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid buffer index received.
\n
"
);
return
AVERROR
(
EINVAL
);
}
if
(
s
->
frame_size
>
0
&&
buf
.
bytesused
!=
s
->
frame_size
)
{
if
(
s
->
frame_size
>
0
&&
buf
.
bytesused
!=
s
->
frame_size
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
av_log
(
ctx
,
AV_LOG_ERROR
,
"The v4l2 frame is %d bytes, but %d bytes are expected
\n
"
,
"The v4l2 frame is %d bytes, but %d bytes are expected
\n
"
,
...
...
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