[libdvdnav-devel] [Git][videolan/libdvdread][master] DVD-VR: make timestamps use ptm_t

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat Mar 7 14:17:44 UTC 2026



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


Commits:
a66aec4d by Saifelden Mohamed Ismail at 2026-03-07T15:17:11+01:00
DVD-VR: make timestamps use ptm_t

- - - - -


2 changed files:

- src/dvdread/ifo_types.h
- src/ifo_read.c


Changes:

=====================================
src/dvdread/ifo_types.h
=====================================
@@ -1148,6 +1148,7 @@ typedef struct {
   uint8_t pgtm[5];
 } ATTRIBUTE_PACKED pgtm_t;
 
+/* used throughout the program for timestamps */
 typedef struct {
   uint32_t ptm;
   uint16_t ptm_extra; /* extra to DSI pkts */
@@ -1249,7 +1250,7 @@ typedef struct  {
 
 typedef struct  {
   uint8_t    ep_ty; /* type */
-  uint8_t    ep_ptm[6]; /* entry point time pts */
+  ptm_t      ep_ptm; /* entry point time pts */
 } ATTRIBUTE_PACKED m_c_epi_t;
 #define M_C_EPI_SIZE 7U
 
@@ -1265,8 +1266,8 @@ typedef struct  {
   };
   uint8_t    end_image; /* will be zero if type is movie cell */
   uint8_t    c_epi_n; /* used to allocate m_c_epi */
-  uint8_t    c_v_s_ptm[6];
-  uint8_t    c_v_e_ptm[6];
+  ptm_t      c_v_s_ptm;
+  ptm_t      c_v_e_ptm;
   m_c_epi_t* m_c_epi; /*  movie cell entry points. seekable chapters */
 } ATTRIBUTE_PACKED m_c_gi_t;
 #define M_C_GI_SIZE 18U


=====================================
src/ifo_read.c
=====================================
@@ -1693,6 +1693,12 @@ int ifoRead_UD_PGCIT(ifo_handle_t *ifofile) {
 
     B2N_16(ud_pgcit->m_c_gi[i].m_vobi_srpn);
 
+    B2N_32(ud_pgcit->m_c_gi[i].c_v_s_ptm.ptm);
+    B2N_16(ud_pgcit->m_c_gi[i].c_v_s_ptm.ptm_extra);
+
+    B2N_32(ud_pgcit->m_c_gi[i].c_v_e_ptm.ptm);
+    B2N_16(ud_pgcit->m_c_gi[i].c_v_e_ptm.ptm_extra);
+
     if(ud_pgcit->m_c_gi[i].c_epi_n > 0){
       ud_pgcit->m_c_gi[i].m_c_epi = calloc(ud_pgcit->m_c_gi[i].c_epi_n, M_C_EPI_SIZE );
 
@@ -1705,6 +1711,11 @@ int ifoRead_UD_PGCIT(ifo_handle_t *ifofile) {
         goto fail4;
       }
 
+      for( int j = 0; j > ud_pgcit->m_c_gi[j].c_epi_n; j++){
+        B2N_32(ud_pgcit->m_c_gi[i].m_c_epi[j].ep_ptm.ptm);
+        B2N_16(ud_pgcit->m_c_gi[i].m_c_epi[j].ep_ptm.ptm_extra);
+      }
+
     }
 
   }



View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/a66aec4dd722dbfed0be3e26eb36270cea5d2df6

-- 
View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/a66aec4dd722dbfed0be3e26eb36270cea5d2df6
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the libdvdnav-devel mailing list