Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
14bb9844
Commit
14bb9844
authored
Dec 04, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dc1394: We must quit the function if the file handler is -1 (and not continue like if that's ok).
parent
c6aba4ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
modules/access/dc1394.c
modules/access/dc1394.c
+15
-9
No files found.
modules/access/dc1394.c
View file @
14bb9844
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
*****************************************************************************/
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
OpenAudioDev
(
demux_t
*
p_demux
);
static
int
OpenAudioDev
(
demux_t
*
p_demux
);
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
);
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
);
vlc_module_begin
()
vlc_module_begin
()
...
@@ -400,8 +400,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -400,8 +400,7 @@ static int Open( vlc_object_t *p_this )
if
(
p_sys
->
audio_device
)
if
(
p_sys
->
audio_device
)
{
{
OpenAudioDev
(
p_demux
);
if
(
OpenAudioDev
(
p_demux
)
==
VLC_SUCCESS
)
if
(
p_sys
->
fd_audio
>=
0
)
{
{
es_format_t
fmt
;
es_format_t
fmt
;
es_format_Init
(
&
fmt
,
AUDIO_ES
,
VLC_CODEC_S16L
);
/* FIXME: hmm, ?? */
es_format_Init
(
&
fmt
,
AUDIO_ES
,
VLC_CODEC_S16L
);
/* FIXME: hmm, ?? */
...
@@ -435,7 +434,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -435,7 +434,7 @@ static int Open( vlc_object_t *p_this )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
static
void
OpenAudioDev
(
demux_t
*
p_demux
)
static
int
OpenAudioDev
(
demux_t
*
p_demux
)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
char
*
psz_device
=
p_sys
->
audio_device
;
char
*
psz_device
=
p_sys
->
audio_device
;
...
@@ -446,7 +445,7 @@ static void OpenAudioDev( demux_t *p_demux )
...
@@ -446,7 +445,7 @@ static void OpenAudioDev( demux_t *p_demux )
if
(
p_sys
->
fd_audio
<
0
)
if
(
p_sys
->
fd_audio
<
0
)
{
{
msg_Err
(
p_demux
,
"Cannot open audio device (%s)"
,
psz_device
);
msg_Err
(
p_demux
,
"Cannot open audio device (%s)"
,
psz_device
);
CloseAudioDev
(
p_demux
)
;
return
VLC_EGENERIC
;
}
}
if
(
!
p_sys
->
i_sample_rate
)
if
(
!
p_sys
->
i_sample_rate
)
...
@@ -457,7 +456,7 @@ static void OpenAudioDev( demux_t *p_demux )
...
@@ -457,7 +456,7 @@ static void OpenAudioDev( demux_t *p_demux )
{
{
msg_Err
(
p_demux
,
"Cannot set audio format (16b little endian) "
msg_Err
(
p_demux
,
"Cannot set audio format (16b little endian) "
"(%d)"
,
i_format
);
"(%d)"
,
i_format
);
CloseAudioDev
(
p_demux
)
;
goto
error
;
}
}
result
=
ioctl
(
p_sys
->
fd_audio
,
SNDCTL_DSP_CHANNELS
,
&
p_sys
->
channels
);
result
=
ioctl
(
p_sys
->
fd_audio
,
SNDCTL_DSP_CHANNELS
,
&
p_sys
->
channels
);
...
@@ -465,7 +464,7 @@ static void OpenAudioDev( demux_t *p_demux )
...
@@ -465,7 +464,7 @@ static void OpenAudioDev( demux_t *p_demux )
{
{
msg_Err
(
p_demux
,
"Cannot set audio channels count (%d)"
,
msg_Err
(
p_demux
,
"Cannot set audio channels count (%d)"
,
p_sys
->
channels
);
p_sys
->
channels
);
CloseAudioDev
(
p_demux
)
;
goto
error
;
}
}
result
=
ioctl
(
p_sys
->
fd_audio
,
SNDCTL_DSP_SPEED
,
&
p_sys
->
i_sample_rate
);
result
=
ioctl
(
p_sys
->
fd_audio
,
SNDCTL_DSP_SPEED
,
&
p_sys
->
i_sample_rate
);
...
@@ -473,7 +472,7 @@ static void OpenAudioDev( demux_t *p_demux )
...
@@ -473,7 +472,7 @@ static void OpenAudioDev( demux_t *p_demux )
{
{
msg_Err
(
p_demux
,
"Cannot set audio sample rate (%d)"
,
msg_Err
(
p_demux
,
"Cannot set audio sample rate (%d)"
,
p_sys
->
i_sample_rate
);
p_sys
->
i_sample_rate
);
CloseAudioDev
(
p_demux
)
;
goto
error
;
}
}
msg_Dbg
(
p_demux
,
"Opened adev=`%s' %s %dHz"
,
msg_Dbg
(
p_demux
,
"Opened adev=`%s' %s %dHz"
,
...
@@ -482,6 +481,13 @@ static void OpenAudioDev( demux_t *p_demux )
...
@@ -482,6 +481,13 @@ static void OpenAudioDev( demux_t *p_demux )
p_sys
->
i_sample_rate
);
p_sys
->
i_sample_rate
);
p_sys
->
i_audio_max_frame_size
=
32
*
1024
;
p_sys
->
i_audio_max_frame_size
=
32
*
1024
;
return
VLC_SUCCESS
;
error:
CloseAudioDev
(
p_demux
);
p_sys
->
fd_audio
=
-
1
;
return
VLC_EGENERIC
;
}
}
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
)
static
inline
void
CloseAudioDev
(
demux_t
*
p_demux
)
...
@@ -633,7 +639,7 @@ static int Demux( demux_t *p_demux )
...
@@ -633,7 +639,7 @@ static int Demux( demux_t *p_demux )
block_t
*
p_blockv
=
NULL
;
block_t
*
p_blockv
=
NULL
;
/* Try grabbing audio frames first */
/* Try grabbing audio frames first */
if
(
p_sys
->
fd_audio
>
0
)
if
(
p_sys
->
fd_audio
>
=
0
)
p_blocka
=
GrabAudio
(
p_demux
);
p_blocka
=
GrabAudio
(
p_demux
);
/* Try grabbing video frame */
/* Try grabbing video frame */
...
...
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