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
435f1d55
Commit
435f1d55
authored
Jan 03, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed BDA support (close #5627).
parent
cc319102
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
17 deletions
+29
-17
modules/access/dtv/bdagraph.cpp
modules/access/dtv/bdagraph.cpp
+29
-17
No files found.
modules/access/dtv/bdagraph.cpp
View file @
435f1d55
...
@@ -305,28 +305,40 @@ void BDAOutput::Push( block_t *p_block )
...
@@ -305,28 +305,40 @@ void BDAOutput::Push( block_t *p_block )
ssize_t
BDAOutput
::
Pop
(
void
*
buf
,
size_t
len
)
ssize_t
BDAOutput
::
Pop
(
void
*
buf
,
size_t
len
)
{
{
block_t
*
block
;
{
vlc_mutex_locker
l
(
&
lock
);
vlc_mutex_locker
l
(
&
lock
);
if
(
!
p_first
)
mtime_t
i_deadline
=
mdate
()
+
250
*
1000
;
vlc_cond_timedwait
(
&
wait
,
&
lock
,
mdate
()
+
250
*
1000
);
while
(
!
p_first
)
{
block
=
p_first
;
if
(
vlc_cond_timedwait
(
&
wait
,
&
lock
,
i_deadline
)
)
p_first
=
NULL
;
return
-
1
;
pp_next
=
&
p_first
;
}
}
if
(
block
==
NULL
)
size_t
i_index
=
0
;
return
-
1
;
while
(
i_index
<
len
)
{
size_t
i_copy
=
__MIN
(
len
-
i_index
,
p_first
->
i_buffer
);
memcpy
(
(
uint8_t
*
)
buf
+
i_index
,
p_first
->
p_buffer
,
i_copy
);
if
(
len
<
block
->
i_buffer
)
i_index
+=
i_copy
;
msg_Err
(
p_access
,
"buffer overflow!"
);
else
p_first
->
p_buffer
+=
i_copy
;
len
=
block
->
i_buffer
;
p_first
->
i_buffer
-=
i_copy
;
vlc_memcpy
(
buf
,
block
->
p_buffer
,
len
);
block_Release
(
block
);
if
(
p_first
->
i_buffer
<=
0
)
return
len
;
{
block_t
*
p_next
=
p_first
->
p_next
;
block_Release
(
p_first
);
p_first
=
p_next
;
if
(
!
p_first
)
{
pp_next
=
&
p_first
;
break
;
}
}
}
return
i_index
;
}
}
void
BDAOutput
::
Empty
()
void
BDAOutput
::
Empty
()
...
...
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