Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
691578d4
Commit
691578d4
authored
5 years ago
by
François Cartegnie
Browse files
Options
Downloads
Patches
Plain Diff
packetizer: h264: handle secondary drain
parent
8fc06287
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/packetizer/h264.c
+20
-1
20 additions, 1 deletion
modules/packetizer/h264.c
with
20 additions
and
1 deletion
modules/packetizer/h264.c
+
20
−
1
View file @
691578d4
...
...
@@ -144,6 +144,7 @@ static void PacketizeFlush( decoder_t * );
static
void
PacketizeReset
(
void
*
p_private
,
bool
b_broken
);
static
block_t
*
PacketizeParse
(
void
*
p_private
,
bool
*
pb_ts_used
,
block_t
*
);
static
int
PacketizeValidate
(
void
*
p_private
,
block_t
*
);
static
block_t
*
PacketizeDrain
(
void
*
p_private
);
static
block_t
*
ParseNALBlock
(
decoder_t
*
,
bool
*
pb_ts_used
,
block_t
*
);
...
...
@@ -337,7 +338,7 @@ static int Open( vlc_object_t *p_this )
packetizer_Init
(
&
p_sys
->
packetizer
,
p_h264_startcode
,
sizeof
(
p_h264_startcode
),
startcode_FindAnnexB
,
p_h264_startcode
,
1
,
5
,
PacketizeReset
,
PacketizeParse
,
PacketizeValidate
,
NULL
,
PacketizeReset
,
PacketizeParse
,
PacketizeValidate
,
PacketizeDrain
,
p_dec
);
p_sys
->
b_slice
=
false
;
...
...
@@ -580,6 +581,24 @@ static int PacketizeValidate( void *p_private, block_t *p_au )
return
VLC_SUCCESS
;
}
static
block_t
*
PacketizeDrain
(
void
*
p_private
)
{
decoder_t
*
p_dec
=
p_private
;
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
if
(
!
p_sys
->
b_slice
)
return
NULL
;
block_t
*
p_out
=
OutputPicture
(
p_dec
);
if
(
p_out
&&
(
p_out
->
i_flags
&
BLOCK_FLAG_DROP
)
)
{
block_Release
(
p_out
);
p_out
=
NULL
;
}
return
p_out
;
}
/*****************************************************************************
* ParseNALBlock: parses annexB type NALs
* All p_frag blocks are required to start with 0 0 0 1 4-byte startcode
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment