[vlc-devel] [PATCH 03/11] packetizer: copy: reorder and initialize all callback fields
Zhao Zhili
quinkblack at foxmail.com
Tue Jun 19 14:11:35 CEST 2018
---
modules/packetizer/copy.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/packetizer/copy.c b/modules/packetizer/copy.c
index b66a4b7..137d2cb 100644
--- a/modules/packetizer/copy.c
+++ b/modules/packetizer/copy.c
@@ -84,12 +84,6 @@ static int Open( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- if( p_dec->fmt_in.i_cat == SPU_ES )
- p_dec->pf_packetize = PacketizeSub;
- else
- p_dec->pf_packetize = Packetize;
- p_dec->pf_flush = Flush;
-
p_dec->p_sys = p_sys = malloc( sizeof(*p_sys) );
if (unlikely(p_sys == NULL))
return VLC_ENOMEM;
@@ -122,6 +116,12 @@ static int Open( vlc_object_t *p_this )
/* Create the output format */
es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
p_dec->fmt_out.i_codec = fcc;
+ if( p_dec->fmt_in.i_cat == SPU_ES )
+ p_dec->pf_packetize = PacketizeSub;
+ else
+ p_dec->pf_packetize = Packetize;
+ p_dec->pf_flush = Flush;
+ p_dec->pf_get_cc = NULL;
return VLC_SUCCESS;
}
--
2.9.5
More information about the vlc-devel
mailing list