Пример #1
0
static int
_filter_repeats(MPLS_PL *pl, unsigned repeats)
{
    unsigned ii;

    for (ii = 0; ii < pl->list_count; ii++) {
      MPLS_PI *pi;

      pi = &pl->play_item[ii];
      // Ignore titles with repeated segments
      if (_find_repeats(pl, pi->clip[0].clip_id) > repeats) {
        return 0;
      }
    }
    return 1;
}
Пример #2
0
static int
_filter_repeats(MPLS_PL *pl, int repeats)
{
    int ii;

    for (ii = 0; ii < pl->list_count; ii++) {
        MPLS_PI *pi;
        str_t *m2ts_file;

        pi = &pl->play_item[ii];
        m2ts_file = str_substr(pi->clip_id, 0, 5);
        // Ignore titles with repeated segments
        if (_find_repeats(pl, m2ts_file->buf) > repeats) {
            return 0;
        }
        str_free(m2ts_file);
        free(m2ts_file);
    }
    return 1;
}