[vlc-commits] packetizer: AVC: parse closed captions
Francois Cartegnie
git at videolan.org
Thu Aug 6 15:28:42 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Aug 6 15:18:26 2015 +0200| [8d69d2a3f5e8413174eef2615d9dff0125445555] | committer: Francois Cartegnie
packetizer: AVC: parse closed captions
Closed captions are in the same SEI user sections
as H264 according to the spec.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d69d2a3f5e8413174eef2615d9dff0125445555
---
modules/packetizer/h264.c | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/modules/packetizer/h264.c b/modules/packetizer/h264.c
index eb832c0..8502298 100644
--- a/modules/packetizer/h264.c
+++ b/modules/packetizer/h264.c
@@ -336,7 +336,6 @@ static int Open( vlc_object_t *p_this )
/* Set callback */
p_dec->pf_packetize = PacketizeAVC1;
- /* TODO CC ? */
}
else
{
@@ -346,14 +345,6 @@ static int Open( vlc_object_t *p_this )
/* Set callback */
p_dec->pf_packetize = Packetize;
- p_dec->pf_get_cc = GetCc;
-
- /* */
- p_sys->i_cc_pts = VLC_TS_INVALID;
- p_sys->i_cc_dts = VLC_TS_INVALID;
- p_sys->i_cc_flags = 0;
- cc_Init( &p_sys->cc );
- cc_Init( &p_sys->cc_next );
/* */
if( p_dec->fmt_in.i_extra > 0 )
@@ -361,6 +352,16 @@ static int Open( vlc_object_t *p_this )
p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra );
}
+ /* CC are the same for H264/AVC in T35 sections (ETSI TS 101 154) */
+ p_dec->pf_get_cc = GetCc;
+
+ /* */
+ p_sys->i_cc_pts = VLC_TS_INVALID;
+ p_sys->i_cc_dts = VLC_TS_INVALID;
+ p_sys->i_cc_flags = 0;
+ cc_Init( &p_sys->cc );
+ cc_Init( &p_sys->cc_next );
+
return VLC_SUCCESS;
}
@@ -387,11 +388,8 @@ static void Close( vlc_object_t *p_this )
}
packetizer_Clean( &p_sys->packetizer );
- if( p_dec->pf_get_cc )
- {
- cc_Exit( &p_sys->cc_next );
- cc_Exit( &p_sys->cc );
- }
+ cc_Exit( &p_sys->cc_next );
+ cc_Exit( &p_sys->cc );
free( p_sys );
}
More information about the vlc-commits
mailing list