MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / lookup_title_index

Function lookup_title_index

gtk/src/hb-backend.c:2546–2567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2544}
2545
2546static int
2547lookup_title_index(hb_handle_t *h, int title_id)
2548{
2549 if (h == NULL)
2550 return -1;
2551
2552 hb_list_t *list;
2553 const hb_title_t *title;
2554 int count, ii;
2555
2556 list = hb_get_titles(h);
2557 count = hb_list_count(list);
2558 for (ii = 0; ii < count; ii++)
2559 {
2560 title = hb_list_item(list, ii);
2561 if (title_id == title->index)
2562 {
2563 return ii;
2564 }
2565 }
2566 return -1;
2567}
2568
2569static const hb_title_t*
2570lookup_title(hb_handle_t *h, int title_id, int *index)

Callers 3

lookup_titleFunction · 0.85
ghb_lookup_title_indexFunction · 0.85

Calls 3

hb_get_titlesFunction · 0.85
hb_list_countFunction · 0.85
hb_list_itemFunction · 0.85

Tested by

no test coverage detected