static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,

                           unsigned int pid)

{

    struct Program *p = get_program(ts, programid);

    int i;

    if (!p)

        return;



    if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)

        return;



    for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)

        if (p->pids[i] == pid)

            return;



    p->pids[p->nb_pids++] = pid;

}

static void add_pid_to_pmt(MpegTSContext *ts, unsigned int programid,

                           unsigned int pid)

{

    struct Program *p = get_program(ts, programid);

    int i;

    if (!p)

        return;



    if (p->nb_pids >= MAX_PIDS_PER_PROGRAM)

        return;



    for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)

        if (p->pids[i] == pid)

            return;



    p->pids[p->nb_pids++] = pid;

}

    for (i = 0; i < MAX_PIDS_PER_PROGRAM; i++)
static void FUNC_0(MpegTSContext *VAR_0, unsigned int VAR_1,

                           unsigned int VAR_2)

{

    struct Program *VAR_3 = get_program(VAR_0, VAR_1);

    int VAR_4;

    if (!VAR_3)

        return;



    if (VAR_3->nb_pids >= MAX_PIDS_PER_PROGRAM)

        return;



    for (VAR_4 = 0; VAR_4 < MAX_PIDS_PER_PROGRAM; VAR_4++)

        if (VAR_3->pids[VAR_4] == VAR_2)

            return;



    VAR_3->pids[VAR_3->nb_pids++] = VAR_2;

}

static void FUNC_0(MpegTSContext *VAR_0, unsigned int VAR_1,
unsigned int VAR_2)
{ struct Program *VAR_3 = get_program(VAR_0, VAR_1); int VAR_4; if (!VAR_3)
return; if (VAR_3->nb_pids >= MAX_PIDS_PER_PROGRAM)
return; for (VAR_4 = 0; VAR_4 < MAX_PIDS_PER_PROGRAM; VAR_4++) if (VAR_3->pids[VAR_4] == VAR_2)
return; VAR_3->pids[VAR_3->nb_pids++] = VAR_2; }