Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
f57a2f30
Commit
f57a2f30
authored
Aug 27, 2003
by
gbazin
Browse files
* modules/access/dshow/dshow.cpp: fixed crash when no dshow devices found.
parent
f050c702
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/access/dshow/dshow.cpp
View file @
f57a2f30
...
...
@@ -2,7 +2,7 @@
* dshow.c : DirectShow access module for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: dshow.cpp,v 1.
5
2003/08/27
07:31:26
gbazin Exp $
* $Id: dshow.cpp,v 1.
6
2003/08/27
12:59:11
gbazin Exp $
*
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -305,13 +305,14 @@ static int AccessOpen( vlc_object_t *p_this )
if
(
!
p_sys
->
i_streams
)
{
/* Release directshow objects */
p_sys
->
p_control
->
Release
();
if
(
p_sys
->
p_control
)
p_sys
->
p_control
->
Release
();
p_sys
->
p_graph
->
Release
();
/* Uninitialize OLE/COM */
CoUninitialize
();
free
(
p_sys
->
p_header
);
free
(
p_sys
->
pp_streams
);
free
(
p_sys
);
return
VLC_EGENERIC
;
}
...
...
@@ -388,9 +389,12 @@ static int OpenDevice( input_thread_t *p_input, string devicename,
access_sys_t
*
p_sys
=
p_input
->
p_access_data
;
list
<
string
>
list_devices
;
/* Enumerate
audio
devices and display their names */
/* Enumerate devices and display their names */
FindCaptureDevice
(
(
vlc_object_t
*
)
p_input
,
NULL
,
&
list_devices
,
b_audio
);
if
(
!
list_devices
.
size
()
)
return
VLC_EGENERIC
;
list
<
string
>::
iterator
iter
;
for
(
iter
=
list_devices
.
begin
();
iter
!=
list_devices
.
end
();
iter
++
)
msg_Dbg
(
p_input
,
"found device: %s"
,
iter
->
c_str
()
);
...
...
Write
Preview
Supports
Markdown
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