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
d813da5e
Commit
d813da5e
authored
Apr 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added and used a packetizer_Header for packetizers.
parent
55441fa5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
23 deletions
+18
-23
modules/packetizer/h264.c
modules/packetizer/h264.c
+2
-13
modules/packetizer/packetizer_helper.h
modules/packetizer/packetizer_helper.h
+14
-0
modules/packetizer/vc1.c
modules/packetizer/vc1.c
+2
-10
No files found.
modules/packetizer/h264.c
View file @
d813da5e
...
@@ -355,19 +355,8 @@ static int Open( vlc_object_t *p_this )
...
@@ -355,19 +355,8 @@ static int Open( vlc_object_t *p_this )
/* */
/* */
if
(
p_dec
->
fmt_in
.
i_extra
>
0
)
if
(
p_dec
->
fmt_in
.
i_extra
>
0
)
{
packetizer_Header
(
&
p_sys
->
packetizer
,
block_t
*
p_init
=
block_New
(
p_dec
,
p_dec
->
fmt_in
.
i_extra
);
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
);
block_t
*
p_pic
;
memcpy
(
p_init
->
p_buffer
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
);
while
(
(
p_pic
=
Packetize
(
p_dec
,
&
p_init
)
)
)
{
/* Should not occur because we should only receive SPS/PPS */
block_Release
(
p_pic
);
}
}
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
modules/packetizer/packetizer_helper.h
View file @
d813da5e
...
@@ -182,5 +182,19 @@ static inline block_t *packetizer_Packetize( packetizer_t *p_pack, block_t **pp_
...
@@ -182,5 +182,19 @@ static inline block_t *packetizer_Packetize( packetizer_t *p_pack, block_t **pp_
}
}
}
}
static
inline
void
packetizer_Header
(
packetizer_t
*
p_pack
,
const
uint8_t
*
p_header
,
int
i_header
)
{
block_t
*
p_init
=
block_Alloc
(
i_header
);
if
(
!
p_init
)
return
;
memcpy
(
p_init
->
p_buffer
,
p_header
,
i_header
);
block_t
*
p_pic
;
while
(
(
p_pic
=
packetizer_Packetize
(
p_pack
,
&
p_init
)
)
)
block_Release
(
p_pic
);
/* Should not happen (only sequence header) */
}
#endif
#endif
modules/packetizer/vc1.c
View file @
d813da5e
...
@@ -165,16 +165,8 @@ static int Open( vlc_object_t *p_this )
...
@@ -165,16 +165,8 @@ static int Open( vlc_object_t *p_this )
/* */
/* */
if
(
p_dec
->
fmt_out
.
i_extra
>
0
)
if
(
p_dec
->
fmt_out
.
i_extra
>
0
)
{
packetizer_Header
(
&
p_sys
->
packetizer
,
block_t
*
p_init
=
block_New
(
p_dec
,
p_dec
->
fmt_out
.
i_extra
);
p_dec
->
fmt_out
.
p_extra
,
p_dec
->
fmt_out
.
i_extra
);
memcpy
(
p_init
->
p_buffer
,
p_dec
->
fmt_out
.
p_extra
,
p_dec
->
fmt_out
.
i_extra
);
block_t
*
p_pic
;
while
(
(
p_pic
=
Packetize
(
p_dec
,
&
p_init
)
)
)
block_Release
(
p_pic
);
/* Should not happen (only sequence header) */
}
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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