[libdvdnav-devel] [Git][videolan/libdvdnav][master] Fixed dvdnav_cell_find for cell boundary

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Fri Aug 7 16:59:09 UTC 2026



Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav


Commits:
5aaa457e by CrystalP at 2026-08-07T18:57:28+02:00
Fixed dvdnav_cell_find for cell boundary

make seeking to the very end work again

Co-authored-by: Saifelden Mohamed Ismail <saifeldenmi at gmail.com>

- - - - -


1 changed file:

- src/searching.c


Changes:

=====================================
src/searching.c
=====================================
@@ -1045,7 +1045,8 @@ static int32_t dvdnav_cell_find(dvdnav_t *this, dvd_state_t *state,
     /* 90 pts to ms */
     cell_data->end->time += (dvdnav_convert_time(&cell->playback_time) / 90);
     if (  find_val >= cell_data->bgn->time
-       && find_val <= cell_data->end->time) {
+       && (  find_val < cell_data->end->time
+          || (cell_idx == cells_end && find_val == cell_data->end->time))) {
       found = 1;
       break;
     }
@@ -1283,8 +1284,8 @@ static int32_t dvdnav_find_vobu_by_cell_boundaries(dvdnav_t *this,
     return 0;
   }
   cell_len = cell_data->end->time - cell_data->bgn->time;
-  if (cell_len < 0) {
-    Log1(this, "cell_len < 0");
+  if (cell_len <= 0) {
+    Log1(this, "cell_len <= 0");
     return 0;
   }
   jump_pct = (jump_offset * 1000) / cell_len;



View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/commit/5aaa457e8260b47695641ebea881e5ede09b37ad

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/commit/5aaa457e8260b47695641ebea881e5ede09b37ad
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the libdvdnav-devel mailing list