[vlc-commits] packetizer: hevc: add secondary drain
Francois Cartegnie
git at videolan.org
Fri Oct 11 17:28:34 CEST 2019
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Sep 24 15:59:50 2019 +0200| [b34ef355927baddc7d7b5385e71a4c4dbc8de86d] | committer: Francois Cartegnie
packetizer: hevc: add secondary drain
(cherry picked from commit 7793d7bb84da43929d14f9602d5babf0869fa52b)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=b34ef355927baddc7d7b5385e71a4c4dbc8de86d
---
modules/packetizer/hevc.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/modules/packetizer/hevc.c b/modules/packetizer/hevc.c
index 7c007b1eb2..992e6849f6 100644
--- a/modules/packetizer/hevc.c
+++ b/modules/packetizer/hevc.c
@@ -70,6 +70,7 @@ static void PacketizeReset(void *p_private, bool b_broken);
static block_t *PacketizeParse(void *p_private, bool *pb_ts_used, block_t *);
static block_t *ParseNALBlock(decoder_t *, bool *pb_ts_used, block_t *);
static int PacketizeValidate(void *p_private, block_t *);
+static block_t * PacketizeDrain(void *);
static bool ParseSEICallback( const hxxx_sei_data_t *, void * );
static block_t *GetCc( decoder_t *, decoder_cc_desc_t * );
@@ -190,7 +191,7 @@ static int Open(vlc_object_t *p_this)
packetizer_Init(&p_dec->p_sys->packetizer,
p_hevc_startcode, sizeof(p_hevc_startcode), startcode_FindAnnexB,
p_hevc_startcode, 1, 5,
- PacketizeReset, PacketizeParse, PacketizeValidate, NULL,
+ PacketizeReset, PacketizeParse, PacketizeValidate, PacketizeDrain,
p_dec);
/* Copy properties */
@@ -933,6 +934,27 @@ 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;
+
+ block_t *p_out = NULL;
+
+ if( p_sys->frame.p_chain &&
+ p_sys->b_init_sequence_complete )
+ {
+ p_out = OutputQueues(p_sys, true);
+ if( p_out )
+ {
+ p_out = GatherAndValidateChain(p_out);
+ if( p_out )
+ SetOutputBlockProperties( p_dec, p_out );
+ }
+ }
+ return p_out;
+}
+
static bool ParseSEICallback( const hxxx_sei_data_t *p_sei_data, void *cbdata )
{
decoder_t *p_dec = (decoder_t *) cbdata;
More information about the vlc-commits
mailing list