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
2c2b4687
Commit
2c2b4687
authored
Aug 29, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
block_t: repack
parent
66421873
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
include/vlc_block.h
include/vlc_block.h
+6
-7
src/misc/block.c
src/misc/block.c
+4
-4
No files found.
include/vlc_block.h
View file @
2c2b4687
...
...
@@ -103,17 +103,16 @@ struct block_t
{
block_t
*
p_next
;
uint8_t
*
p_buffer
;
size_t
i_buffer
;
uint32_t
i_flags
;
unsigned
i_nb_samples
;
/* Used for audio */
mtime_t
i_pts
;
mtime_t
i_dts
;
mtime_t
i_length
;
unsigned
i_nb_samples
;
/* Used for audio */
size_t
i_buffer
;
uint8_t
*
p_buffer
;
/* Rudimentary support for overloading block (de)allocation. */
block_free_t
pf_release
;
};
...
...
@@ -147,11 +146,11 @@ static inline block_t *block_Duplicate( block_t *p_block )
if
(
p_dup
==
NULL
)
return
NULL
;
p_dup
->
i_flags
=
p_block
->
i_flags
;
p_dup
->
i_nb_samples
=
p_block
->
i_nb_samples
;
p_dup
->
i_dts
=
p_block
->
i_dts
;
p_dup
->
i_pts
=
p_block
->
i_pts
;
p_dup
->
i_flags
=
p_block
->
i_flags
;
p_dup
->
i_length
=
p_block
->
i_length
;
p_dup
->
i_nb_samples
=
p_block
->
i_nb_samples
;
memcpy
(
p_dup
->
p_buffer
,
p_block
->
p_buffer
,
p_block
->
i_buffer
);
return
p_dup
;
...
...
src/misc/block.c
View file @
2c2b4687
...
...
@@ -60,13 +60,13 @@ void block_Init( block_t *restrict b, void *buf, size_t size )
{
/* Fill all fields to their default */
b
->
p_next
=
NULL
;
b
->
p_buffer
=
buf
;
b
->
i_buffer
=
size
;
b
->
i_flags
=
0
;
b
->
i_nb_samples
=
0
;
b
->
i_pts
=
b
->
i_dts
=
VLC_TS_INVALID
;
b
->
i_length
=
0
;
b
->
i_nb_samples
=
0
;
b
->
p_buffer
=
buf
;
b
->
i_buffer
=
size
;
#ifndef NDEBUG
b
->
pf_release
=
BlockNoRelease
;
#endif
...
...
@@ -80,11 +80,11 @@ static void BlockRelease( block_t *p_block )
static
void
BlockMetaCopy
(
block_t
*
restrict
out
,
const
block_t
*
in
)
{
out
->
p_next
=
in
->
p_next
;
out
->
i_nb_samples
=
in
->
i_nb_samples
;
out
->
i_dts
=
in
->
i_dts
;
out
->
i_pts
=
in
->
i_pts
;
out
->
i_flags
=
in
->
i_flags
;
out
->
i_length
=
in
->
i_length
;
out
->
i_nb_samples
=
in
->
i_nb_samples
;
}
/* Memory alignment (must be a multiple of sizeof(void*) and a power of two) */
...
...
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