+
+ /* Check CC status */
+ input_DecoderIsCcPresent( es->p_dec, pb_cc );
+ for( i = 0; i < 4; i++ )
+ {
+ static const vlc_fourcc_t fcc[4] = {
+ VLC_FOURCC('c', 'c', '1', ' '),
+ VLC_FOURCC('c', 'c', '2', ' '),
+ VLC_FOURCC('c', 'c', '3', ' '),
+ VLC_FOURCC('c', 'c', '4', ' '),
+ };
+ static const char ppsz_description[4][18] = {
+ N_("Closed captions 1"),
+ N_("Closed captions 2"),
+ N_("Closed captions 3"),
+ N_("Closed captions 4"),
+ };
+ es_format_t fmt;
+
+ if( es->pb_cc_present[i] || !pb_cc[i] )
+ continue;
+ msg_Dbg( p_input, "Adding CC track %d for es[%d]", 1+i, es->i_id );
+
+ es_format_Init( &fmt, SPU_ES, fcc[i] );
+ fmt.i_group = es->fmt.i_group;
+ fmt.psz_description = strdup( _(ppsz_description[i] ) );
+ es->pp_cc_es[i] = EsOutAdd( out, &fmt );
+ es->pp_cc_es[i]->p_master = es;
+ es_format_Clean( &fmt );
+
+ /* */
+ es->pb_cc_present[i] = true;
+ b_cc_new = true;
+ }
+ if( b_cc_new )
+ var_SetBool( p_sys->p_input, "intf-change", true );