Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
14fbb294
Commit
14fbb294
authored
Oct 20, 2010
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smem: give an error message if pre-render function didn't give a buffer
parent
e3c90299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
modules/stream_out/smem.c
modules/stream_out/smem.c
+17
-2
No files found.
modules/stream_out/smem.c
View file @
14fbb294
...
...
@@ -342,7 +342,7 @@ static int SendVideo( sout_stream_t *p_stream, sout_stream_id_t *id,
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
int
i_line
,
i_line_size
,
i_size
,
i_pixel_pitch
;
uint8_t
*
p_pixels
;
uint8_t
*
p_pixels
=
NULL
;
if
(
id
->
format
->
video
.
i_bits_per_pixel
>
0
)
{
...
...
@@ -357,6 +357,14 @@ static int SendVideo( sout_stream_t *p_stream, sout_stream_id_t *id,
}
/* Calling the prerender callback to get user buffer */
p_sys
->
pf_video_prerender_callback
(
id
->
p_data
,
&
p_pixels
,
i_size
);
if
(
!
p_pixels
)
{
msg_Err
(
p_stream
,
"No buffer given!"
);
block_ChainRelease
(
p_buffer
);
return
VLC_EGENERIC
;
}
/* Copying data into user buffer */
if
(
id
->
format
->
video
.
i_bits_per_pixel
>
0
)
{
...
...
@@ -380,13 +388,20 @@ static int SendAudio( sout_stream_t *p_stream, sout_stream_id_t *id,
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
int
i_size
;
uint8_t
*
p_pcm_buffer
;
uint8_t
*
p_pcm_buffer
=
NULL
;
int
i_samples
=
0
;
i_size
=
p_buffer
->
i_buffer
;
i_samples
=
i_size
/
(
(
id
->
format
->
audio
.
i_bitspersample
/
8
)
*
id
->
format
->
audio
.
i_channels
);
/* Calling the prerender callback to get user buffer */
p_sys
->
pf_audio_prerender_callback
(
id
->
p_data
,
&
p_pcm_buffer
,
i_size
);
if
(
!
p_pcm_buffer
)
{
msg_Err
(
p_stream
,
"No buffer given!"
);
block_ChainRelease
(
p_buffer
);
return
VLC_EGENERIC
;
}
/* Copying data into user buffer */
vlc_memcpy
(
p_pcm_buffer
,
p_buffer
->
p_buffer
,
i_size
);
/* Calling the postrender callback to tell the user his buffer is ready */
...
...
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