[vlc-commits] packetizer: copy: reorder and initialize all callback fields
Zhao Zhili
git at videolan.org
Wed Jun 20 14:45:14 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Tue Jun 19 20:11:35 2018 +0800| [3f76cba1fee4af299226cfd3a25aa469287f30ad] | committer: Thomas Guillem
packetizer: copy: reorder and initialize all callback fields
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3f76cba1fee4af299226cfd3a25aa469287f30ad
---
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 b66a4b7af6..137d2cbffb 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;
}
More information about the vlc-commits
mailing list