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
b9f382c8
Commit
b9f382c8
authored
Dec 07, 2008
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary ret variable.
Originally committed as revision 16033 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
36b53281
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
v4l.c
libavdevice/v4l.c
+4
-6
No files found.
libavdevice/v4l.c
View file @
b9f382c8
...
...
@@ -72,7 +72,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
AVStream
*
st
;
int
width
,
height
;
int
video_fd
,
frame_size
;
int
ret
,
frame_rate
,
frame_rate_base
;
int
frame_rate
,
frame_rate_base
;
int
desired_palette
,
desired_depth
;
struct
video_tuner
tuner
;
struct
video_audio
audio
;
...
...
@@ -167,7 +167,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
/* try to choose a suitable video format */
pict
.
palette
=
desired_palette
;
pict
.
depth
=
desired_depth
;
if
(
desired_palette
==
-
1
||
(
ret
=
ioctl
(
video_fd
,
VIDIOCSPICT
,
&
pict
)
)
<
0
)
{
if
(
desired_palette
==
-
1
||
ioctl
(
video_fd
,
VIDIOCSPICT
,
&
pict
)
<
0
)
{
for
(
j
=
0
;
j
<
vformat_num
;
j
++
)
{
pict
.
palette
=
video_formats
[
j
].
palette
;
pict
.
depth
=
video_formats
[
j
].
depth
;
...
...
@@ -178,8 +178,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
goto
fail1
;
}
ret
=
ioctl
(
video_fd
,
VIDIOCGMBUF
,
&
s
->
gb_buffers
);
if
(
ret
<
0
)
{
if
(
ioctl
(
video_fd
,
VIDIOCGMBUF
,
&
s
->
gb_buffers
)
<
0
)
{
/* try to use read based access */
struct
video_window
win
;
int
val
;
...
...
@@ -218,8 +217,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s
->
gb_buf
.
width
=
width
;
s
->
gb_buf
.
format
=
pict
.
palette
;
ret
=
ioctl
(
video_fd
,
VIDIOCMCAPTURE
,
&
s
->
gb_buf
);
if
(
ret
<
0
)
{
if
(
ioctl
(
video_fd
,
VIDIOCMCAPTURE
,
&
s
->
gb_buf
)
<
0
)
{
if
(
errno
!=
EAGAIN
)
{
fail1:
av_log
(
s1
,
AV_LOG_ERROR
,
"Fatal: grab device does not support suitable format
\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