Commit 8d69d2a3 authored by Francois Cartegnie's avatar Francois Cartegnie

packetizer: AVC: parse closed captions

Closed captions are in the same SEI user sections
as H264 according to the spec.
parent 71950bfa
......@@ -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 );
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment