Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
836f9311
Commit
836f9311
authored
Jan 13, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try setting the audio input source if the v4l2 device doesn't have any.
parent
29e5b0fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
modules/access/v4l2.c
modules/access/v4l2.c
+15
-8
No files found.
modules/access/v4l2.c
View file @
836f9311
...
@@ -1897,16 +1897,23 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, vlc_bool_t b_d
...
@@ -1897,16 +1897,23 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, vlc_bool_t b_d
goto
open_failed
;
goto
open_failed
;
}
}
if
(
p_sys
->
i_selected_audio_input
>=
p_sys
->
i_audio
)
/* Set audio input */
{
msg_Warn
(
p_obj
,
"invalid audio input. Using the default one"
);
p_sys
->
i_selected_audio_input
=
0
;
}
if
(
ioctl
(
i_fd
,
VIDIOC_S_AUDIO
,
&
p_sys
->
p_audios
[
p_sys
->
i_selected_audio_input
]
)
<
0
)
if
(
p_sys
->
i_audio
>
0
)
{
{
msg_Err
(
p_obj
,
"cannot set audio input (%m)"
);
if
(
p_sys
->
i_selected_audio_input
<
0
goto
open_failed
;
||
p_sys
->
i_selected_audio_input
>=
p_sys
->
i_audio
)
{
msg_Warn
(
p_obj
,
"invalid audio input. Using the default one"
);
p_sys
->
i_selected_audio_input
=
0
;
}
if
(
ioctl
(
i_fd
,
VIDIOC_S_AUDIO
,
&
p_sys
->
p_audios
[
p_sys
->
i_selected_audio_input
]
)
<
0
)
{
msg_Err
(
p_obj
,
"cannot set audio input (%m)"
);
goto
open_failed
;
}
msg_Dbg
(
p_obj
,
"Audio input set to %d"
,
p_sys
->
i_selected_audio_input
);
}
}
...
...
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