From gitlab at videolan.org Sat Jul 4 08:21:37 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 10:21:37 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] 4 commits: dvdread: close the ifo file before reopening it for SAMG and ASVS Message-ID: <6a48c291cae11_308df1bdb0cbc1720865@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: 8ab50502 by Saifelden Mohamed Ismail at 2026-07-02T22:18:02+03:00 dvdread: close the ifo file before reopening it for SAMG and ASVS - - - - - c1e02078 by Saifelden Mohamed Ismail at 2026-07-02T22:18:02+03:00 dvdread: read the ASVS ifo before its backup in ifoOpenASVS - - - - - 7eaad91b by Saifelden Mohamed Ismail at 2026-07-02T22:18:02+03:00 dvdread: check the track table realloc in ifoRead_TIF - - - - - 4c0fbd5a by Saifelden Mohamed Ismail at 2026-07-02T22:18:02+03:00 dvdread: null check the reader in DVDClose - - - - - 2 changed files: - src/dvd_reader.c - src/ifo_read.c Changes: ===================================== src/dvd_reader.c ===================================== @@ -857,10 +857,12 @@ dvd_reader_t *DVDOpenFiles( void *priv, const dvd_logger_cb *logcb, void DVDClose( dvd_reader_t *dvd ) { if( dvd ) { - if( dvd->rd->dev ) dvdinput_close( dvd->rd->dev ); - if( dvd->rd->path_root ) free( dvd->rd->path_root ); - if( dvd->rd->udfcache ) FreeUDFCache( dvd->rd->udfcache ); - free( dvd->rd ); + if( dvd->rd ) { + if( dvd->rd->dev ) dvdinput_close( dvd->rd->dev ); + if( dvd->rd->path_root ) free( dvd->rd->path_root ); + if( dvd->rd->udfcache ) FreeUDFCache( dvd->rd->udfcache ); + free( dvd->rd ); + } if (dvd->fs) { dvd->fs->close(dvd->fs); } ===================================== src/ifo_read.c ===================================== @@ -472,6 +472,7 @@ static ifo_handle_t *ifoOpenFileOrBackup(dvd_reader_t *ctx, int title, goto ifoOpen_fail; /* Should read SAMG as it contains location to AOB pointers */ + DVDCloseFile(ifop->file); ifop->file = DVDOpenFile(ctx, 2, DVD_READ_SAMG_INFO); if(!ifop->file) goto ifoOpen_fail; @@ -479,6 +480,7 @@ static ifo_handle_t *ifoOpenFileOrBackup(dvd_reader_t *ctx, int title, goto ifoOpen_fail; /* The Audio Still Video Set (ASVS) is optional, though usually exists */ + DVDCloseFile(ifop->file); ifop->file = DVDOpenFile(ctx, 2, backup ? DVD_READ_ASVS_INFO_BACKUP : DVD_READ_ASVS_INFO); if(!ifop->file) @@ -672,8 +674,8 @@ ifo_handle_t *ifoOpenASVS(dvd_reader_t *ctx) { if(!ifop) return NULL; - const dvd_read_domain_t domain = backup ? DVD_READ_ASVS_INFO - : DVD_READ_ASVS_INFO_BACKUP; + const dvd_read_domain_t domain = backup ? DVD_READ_ASVS_INFO_BACKUP + : DVD_READ_ASVS_INFO; const char *ext = backup ? "BUP" : "IFO"; ifop->ctx = ctx; @@ -1253,7 +1255,9 @@ int ifoRead_TIF(ifo_handle_t *ifofile, int sector_offset) { /* the second table is an audio_ts only table, the first is audio_ts, video_ts, strangly the nr_titles in second table doesnt match up with the true nr_titles for this table. Need to subtract video titles*/ for(int i=0; inr_of_titles; i++) { if(tracks_info_table->tracks_info[i].type_and_rank==0 && sector_offset == 2) { - tracks_info_table->tracks_info = realloc(tracks_info_table->tracks_info, i * sizeof(track_info_t)); + track_info_t *resized = realloc(tracks_info_table->tracks_info, i * sizeof(track_info_t)); + if(resized || i == 0) + tracks_info_table->tracks_info = resized; tracks_info_table->nr_of_titles = i; break; } View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/5387735ea66d76624f9c421b29f4167fc6f1abff...4c0fbd5aea3d619fa06f084c06b304f71dcc5fc4 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/5387735ea66d76624f9c421b29f4167fc6f1abff...4c0fbd5aea3d619fa06f084c06b304f71dcc5fc4 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 From gitlab at videolan.org Sat Jul 4 09:24:25 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 11:24:25 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] Update NEWS for 7.1.0 Message-ID: <6a48d149be052_308df1bcf34f01732258@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: 8c1c65fb by Jean-Baptiste Kempf at 2026-07-04T11:23:57+02:00 Update NEWS for 7.1.0 And update missing items from previous - - - - - 1 changed file: - NEWS Changes: ===================================== NEWS ===================================== @@ -20,9 +20,11 @@ libdvdread (7.1.0) * Add audio and subpicture code extension enums * Fixes and hardening: * Hardened IFO parsing for oversized still video groups + * Fix DVD-Audio ASVS/SAMG fallback handling + * Fix DVD-VR cell entry point byte swapping * Fix DVDFileSeek validation for non-sector-aligned files * Fix partial-block size accounting - * Fix several DVDOpenVOBPath and path probing failure cases + * Fix resource leaks, null pointer checks and error paths libdvdread (7.0.1) * Fix crashes when dvdcss library is not present @@ -37,16 +39,21 @@ libdvdread (7.0.0) * Use visibility attributes for exported symbols * Docs and Readme updates * Add missing stream callback functionality + * Fix public header include paths * Improve port on Universal Windows Platform * Misc improvements and solidification for the port on various platforms libdvdread (6.1.3) * Improvements for OpenBSD * Fix crashes on some DVD (0 PCGI SRP) + * Fix PTT allocation and command bounds checks + * Avoid changing the working directory when resolving paths * Misc source fixes and cleanups, including fixes for recent toolchains libdvdread (6.1.2) * Fix Win32 Unicode paths opening + * Fix Win32 library loading path handling + * Fix MinGW builds from release tarballs * Fix warnings and build improvements libdvdread (6.1.1) @@ -55,6 +62,7 @@ libdvdread (6.1.1) libdvdread (6.1.0) * Introduce DVDOpen2 and DVDOpenStream2 API to provide logger context * fix playback of broken discs with broken ifo files + * fix VMGI/VTSI BUP fallback handling * improve getmntent_r detection * fix crashes in some disc, with empty contiguous ShortAD * clean obsolete code View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/8c1c65fbbb2944cd0201c404cd72859a18a3bbf8 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/8c1c65fbbb2944cd0201c404cd72859a18a3bbf8 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 From gitlab at videolan.org Sat Jul 4 09:52:29 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 11:52:29 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdnav][master] 3 commits: Fix unused warnings Message-ID: <6a48d7dd16d72_308df1bcf34f01738171@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdnav Commits: 598dac54 by Jean-Baptiste Kempf at 2026-07-04T11:51:50+02:00 Fix unused warnings - - - - - 7ece2f6d by Jean-Baptiste Kempf at 2026-07-04T11:52:03+02:00 Update Changelog for 7.0.1 and update older items - - - - - 9c5f2278 by Jean-Baptiste Kempf at 2026-07-04T11:52:11+02:00 Next release is 7.0.1 - - - - - 3 changed files: - ChangeLog - meson.build - src/navigation.c Changes: ===================================== ChangeLog ===================================== @@ -1,3 +1,6 @@ +libdvdnav (7.0.1) + * add symbol visibility attributes on OS/2 + libdvdnav (7.0.0) * add dvdnav_get_volid_string to obtain the volume id of the disc * add dvdnav_get_number_of_streams API to list tracks @@ -6,10 +9,16 @@ libdvdnav (7.0.0) * add dvdnav_get_disk_region_mask API to get the reported version from the disk * expose dvdnav_jump_to_sector_by_time to the API * switch build system to Meson (and remove autotools) + * remove obsolete MSVC files + * fix public dvdnav.h includes + * fix undefined shifts and add extra navigation safeguards + * update CI targets, including wasm and newer platform images * fix crashes and avoid asserts libdvdnav (6.1.1) * fix build issues + * fix build with LOG_DEBUG enabled + * require C99 in autotools * improve CI libdvdnav (6.1.0) @@ -18,6 +27,7 @@ libdvdnav (6.1.0) * add a dvdnav_version API * rework the logs in the library and remove direct printf calls * handle out-of-order ADMAP entries blocking playback + * harden title search against invalid title numbers * fix crashes in dvdnav_describe_title_chapters in broken DVDs * cleanup old code and buildsystem ===================================== meson.build ===================================== @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT project('libdvdnav', 'c', - version: '7.0.0', + version: '7.0.1', meson_version: '>= 0.60.0', default_options: ['buildtype=debugoptimized', 'c_std=c17', ===================================== src/navigation.c ===================================== @@ -264,6 +264,8 @@ dvdnav_status_t dvdnav_part_play(dvdnav_t *this, int32_t title, int32_t part) { dvdnav_status_t dvdnav_part_play_auto_stop(dvdnav_t *this, int32_t title, int32_t part, int32_t parts_to_play) { /* FIXME: Implement auto-stop */ + (void)parts_to_play; + if (dvdnav_part_play(this, title, part) == DVDNAV_STATUS_OK) printerr("Not implemented yet."); return DVDNAV_STATUS_ERR; @@ -272,6 +274,9 @@ dvdnav_status_t dvdnav_part_play_auto_stop(dvdnav_t *this, int32_t title, dvdnav_status_t dvdnav_time_play(dvdnav_t *this, int32_t title, uint64_t time) { /* FIXME: Implement */ + (void)title; + (void)time; + printerr("Not implemented yet."); return DVDNAV_STATUS_ERR; } View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/cf112772bf626f76a913efca5b883a381e4c123a...9c5f2278eb5b23cdcd0575065f5d575c4e6602a4 -- View it on GitLab: https://code.videolan.org/videolan/libdvdnav/-/compare/cf112772bf626f76a913efca5b883a381e4c123a...9c5f2278eb5b23cdcd0575065f5d575c4e6602a4 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 From gitlab at videolan.org Sat Jul 4 17:40:19 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 19:40:19 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] Extra safety to be sure that off64_t is correctly defined Message-ID: <6a494583cd706_308df1bd89b5818121f7@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: b9188714 by Jean-Baptiste Kempf at 2026-07-04T11:26:30+02:00 Extra safety to be sure that off64_t is correctly defined Orders of includes might be complex - - - - - 2 changed files: - src/dvdread/dvd_filesystem.h - src/dvdread/dvd_reader.h Changes: ===================================== src/dvdread/dvd_filesystem.h ===================================== @@ -34,8 +34,11 @@ typedef SSIZE_T ssize_t; #endif typedef __int64 off64_t; +#elif defined(__GLIBC__) +/* sys/types.h may have been included before _LARGEFILE64_SOURCE was defined. */ +typedef __off64_t off64_t; #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) -/* off_t is already 64 bit here so off64_t is not provided */ +/* off_t is already 64 bit here so off64_t is not provided. */ typedef off_t off64_t; #endif ===================================== src/dvdread/dvd_reader.h ===================================== @@ -23,6 +23,11 @@ #ifndef LIBDVDREAD_DVD_READER_H #define LIBDVDREAD_DVD_READER_H +/* dvd_filesystem.h exposes off64_t in the public filesystem callbacks. */ +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif + #include #include #include View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/b91887146ca57fdd2ffa80ce8cb3ddb562618966 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/b91887146ca57fdd2ffa80ce8cb3ddb562618966 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 From gitlab at videolan.org Sat Jul 4 17:44:25 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 19:44:25 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] ifo_read_free: remove one pointer indirection Message-ID: <6a49467962281_308df1d7ac8781813688@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: 64201466 by Jean-Baptiste Kempf at 2026-07-04T19:40:28+02:00 ifo_read_free: remove one pointer indirection And fix warnings of address of pointer inside packed-struct - - - - - 1 changed file: - src/ifo_read.c Changes: ===================================== src/ifo_read.c ===================================== @@ -126,9 +126,9 @@ static int ifoRead_VOBU_ADMAP_internal(ifo_handle_t *ifofile, static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, unsigned int offset); -static void ifoFree_PGC(pgc_t **pgc); +static void ifoFree_PGC(pgc_t *pgc); static void ifoFree_PGC_COMMAND_TBL(pgc_command_tbl_t *cmd_tbl); -static void ifoFree_PGCIT_internal(pgcit_t **pgcit); +static void ifoFree_PGCIT_internal(pgcit_t *pgcit); static inline int DVDFileSeekForce_( dvd_file_t *dvd_file, uint32_t offset, int force_size ) { return (DVDFileSeekForce(dvd_file, (int)offset, force_size) == (int)offset); @@ -2194,26 +2194,24 @@ int ifoRead_FP_PGC(ifo_handle_t *ifofile) { ifofile->first_play_pgc->ref_count = 1; if(!ifoRead_PGC(ifofile, ifofile->first_play_pgc, ifofile->vmgi_mat->first_play_pgc)) { - ifoFree_PGC(&ifofile->first_play_pgc); + ifoFree_PGC(ifofile->first_play_pgc); + ifofile->first_play_pgc = NULL; return 0; } return 1; } -static void ifoFree_PGC(pgc_t **pgc) { - if(pgc && *pgc && (--(*pgc)->ref_count) <= 0) { - ifoFree_PGC_COMMAND_TBL((*pgc)->command_tbl); - if((*pgc)->program_map) - free((*pgc)->program_map); - if((*pgc)->cell_playback) - free((*pgc)->cell_playback); - if((*pgc)->cell_position) - free((*pgc)->cell_position); - free(*pgc); - } - if (pgc) { - *pgc = NULL; +static void ifoFree_PGC(pgc_t *pgc) { + if(pgc && (--pgc->ref_count) <= 0) { + ifoFree_PGC_COMMAND_TBL(pgc->command_tbl); + if(pgc->program_map) + free(pgc->program_map); + if(pgc->cell_playback) + free(pgc->cell_playback); + if(pgc->cell_position) + free(pgc->cell_position); + free(pgc); } } @@ -2222,7 +2220,8 @@ void ifoFree_FP_PGC(ifo_handle_t *ifofile) { return; if(ifofile->first_play_pgc) { - ifoFree_PGC(&ifofile->first_play_pgc); + ifoFree_PGC(ifofile->first_play_pgc); + ifofile->first_play_pgc = NULL; } } @@ -3136,7 +3135,8 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit, if(!pgcit->pgci_srp[i].pgc) { int j; for(j = 0; j < i; j++) { - ifoFree_PGC(&pgcit->pgci_srp[j].pgc); + ifoFree_PGC(pgcit->pgci_srp[j].pgc); + pgcit->pgci_srp[j].pgc = NULL; } goto fail; } @@ -3157,18 +3157,17 @@ fail: return 0; } -static void ifoFree_PGCIT_internal(pgcit_t **pgcit) { - if(pgcit && *pgcit && (--(*pgcit)->ref_count <= 0)) { +static void ifoFree_PGCIT_internal(pgcit_t *pgcit) { + if(pgcit && (--pgcit->ref_count <= 0)) { int i; - for(i = 0; i < (*pgcit)->nr_of_pgci_srp; i++) + for(i = 0; i < pgcit->nr_of_pgci_srp; i++) { - ifoFree_PGC(&(*pgcit)->pgci_srp[i].pgc); + ifoFree_PGC(pgcit->pgci_srp[i].pgc); + pgcit->pgci_srp[i].pgc = NULL; } - free((*pgcit)->pgci_srp); - free(*pgcit); + free(pgcit->pgci_srp); + free(pgcit); } - if (pgcit) - *pgcit = NULL; } void ifoFree_PGCIT(ifo_handle_t *ifofile) { @@ -3176,7 +3175,8 @@ void ifoFree_PGCIT(ifo_handle_t *ifofile) { return; if(ifofile->vts_pgcit) { - ifoFree_PGCIT_internal(&ifofile->vts_pgcit); + ifoFree_PGCIT_internal(ifofile->vts_pgcit); + ifofile->vts_pgcit = NULL; } } @@ -3294,7 +3294,8 @@ int ifoRead_PGCI_UT(ifo_handle_t *ifofile) { if(!pgci_ut->lu[i].pgcit) { unsigned int j; for(j = 0; j < i; j++) { - ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); + ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); + pgci_ut->lu[j].pgcit = NULL; } free(pgci_ut->lu); free(pgci_ut); @@ -3307,7 +3308,8 @@ int ifoRead_PGCI_UT(ifo_handle_t *ifofile) { + pgci_ut->lu[i].lang_start_byte)) { unsigned int j; for(j = 0; j <= i; j++) { - ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); + ifoFree_PGCIT_internal(pgci_ut->lu[j].pgcit); + pgci_ut->lu[j].pgcit = NULL; } free(pgci_ut->lu); free(pgci_ut); @@ -3330,7 +3332,8 @@ void ifoFree_PGCI_UT(ifo_handle_t *ifofile) { unsigned int i; for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) { - ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit); + ifoFree_PGCIT_internal(ifofile->pgci_ut->lu[i].pgcit); + ifofile->pgci_ut->lu[i].pgcit = NULL; } free(ifofile->pgci_ut->lu); free(ifofile->pgci_ut); View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/64201466a2e375606887a0778351a55f3a0e5844 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/64201466a2e375606887a0778351a55f3a0e5844 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 From gitlab at videolan.org Sat Jul 4 17:48:17 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 04 Jul 2026 19:48:17 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] Fix mixed signess in ifo_read Message-ID: <6a494761433bd_308df1d81b8cc181592b@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: 980143e2 by Jean-Baptiste Kempf at 2026-07-04T19:47:42+02:00 Fix mixed signess in ifo_read - - - - - 1 changed file: - src/ifo_read.c Changes: ===================================== src/ifo_read.c ===================================== @@ -1934,9 +1934,13 @@ static int ifoRead_PGC_COMMAND_TBL(ifo_handle_t *ifofile, B2N_16(cmd_tbl->nr_of_cell); B2N_16(cmd_tbl->last_byte); - CHECK_VALUE(cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_cell<= 255); - CHECK_VALUE((cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_cell) * COMMAND_DATA_SIZE - + PGC_COMMAND_TBL_SIZE <= cmd_tbl->last_byte + 1); + uint32_t nr_cmds = (uint32_t)cmd_tbl->nr_of_pre + + (uint32_t)cmd_tbl->nr_of_post + + (uint32_t)cmd_tbl->nr_of_cell; + + CHECK_VALUE(nr_cmds <= 255); + CHECK_VALUE(nr_cmds * COMMAND_DATA_SIZE + PGC_COMMAND_TBL_SIZE + <= (uint32_t)cmd_tbl->last_byte + 1U); if(cmd_tbl->nr_of_pre != 0) { unsigned int pre_cmds_size = cmd_tbl->nr_of_pre * COMMAND_DATA_SIZE; View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/980143e2192aded576c54a60dd230fa22937b637 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/commit/980143e2192aded576c54a60dd230fa22937b637 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 From gitlab at videolan.org Sat Jul 11 16:14:55 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 11 Jul 2026 18:14:55 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] 2 commits: dvdread: decrypt DVD-Audio VOBs with CPPM instead of CSS Message-ID: <6a526bffe942e_96e124b05780677568@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: bdd19ba5 by Saifelden Mohamed Ismail at 2026-07-11T18:14:12+02:00 dvdread: decrypt DVD-Audio VOBs with CPPM instead of CSS - - - - - 4c0e1a80 by Saifelden Mohamed Ismail at 2026-07-11T18:14:12+02:00 dvdread: guard cpxm init against a null device on directory-tree opens - - - - - 1 changed file: - src/dvd_reader.c Changes: ===================================== src/dvd_reader.c ===================================== @@ -346,7 +346,10 @@ static uint8_t *cppm_get_mkb_or_backup( dvd_reader_t *ctx, int backup ); /* this should only be called if libdvdcss is available and if the disc type is DVD-Audio */ static int cpxm_init_condition( dvd_reader_t* ctx, dvd_type_t type, int have_css ) { - if ( type == DVD_A && have_css ) + if ( !ctx->rd->dev ) + return 0; + + if ( type == DVD_A && have_css ) { uint8_t *p_mkb = NULL; p_mkb = cppm_get_mkb_or_backup( ctx, 0 ); @@ -1110,8 +1113,7 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *ctx, int title, int menu ) /* stream type must be set to determine decryption method*/ /* DVD-Audio discs contain both AOBs and VOBs */ /* DVD_V = VOB with css, DVD_A = AOB with CPPM, DVD_VR = VRO with CPRM */ - dvd_type_t stream_type = (ctx->dvd_type == DVD_VR) ? DVD_VR : - (menu ? DVD_V : ctx->dvd_type); + dvd_type_t stream_type; if ( ctx->dvd_type == DVD_VR && menu ) return NULL; @@ -1132,6 +1134,14 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *ctx, int title, int menu ) /* DVD_Audio title menu */ sprintf( filename, "/AUDIO_TS/AUDIO_SV.VOB" ); } + + if ( ctx->dvd_type == DVD_VR ) + stream_type = DVD_VR; + else if ( !strncmp( filename, "/VIDEO_TS/", 10 ) ) + stream_type = DVD_V; + else + stream_type = DVD_A; + start = UDFFindFile( ctx, filename, &len ); if( start == 0 ) return NULL; @@ -1163,11 +1173,6 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *ctx, int title, int menu ) initAllCSSKeys( ctx ); ctx->rd->css_state = 2; } - /* - if( dvdinput_title( dvd_file->dvd->dev, (int)start ) < 0 ) { - Log0(ctx, "Error cracking CSS key for %s", filename ); - } - */ dvdinput_set_stream( ctx->rd->dev, stream_type ); return dvd_file; @@ -1183,8 +1188,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_reader_t *ctx, int title, int menu ) /* for now will set as the dvd_type, * when hybrid discs are implemented set as title type */ /* DVD_V = VOB with css, DVD_A = AOB with CPPM, DVD_VR = VRO with CPRM */ - dvd_type_t stream_type = (ctx->dvd_type == DVD_VR) ? DVD_VR : - (menu ? DVD_V : ctx->dvd_type); + dvd_type_t stream_type = ctx->dvd_type; dvd_file = calloc( 1, sizeof( dvd_file_t ) ); if( !dvd_file ) return NULL; View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/980143e2192aded576c54a60dd230fa22937b637...4c0e1a800cda716a2b432cd66a30dfa7e835a749 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/980143e2192aded576c54a60dd230fa22937b637...4c0e1a800cda716a2b432cd66a30dfa7e835a749 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 From gitlab at videolan.org Sat Jul 11 16:15:43 2026 From: gitlab at videolan.org (Jean-Baptiste Kempf (@jbk)) Date: Sat, 11 Jul 2026 18:15:43 +0200 Subject: [libdvdnav-devel] [Git][videolan/libdvdread][master] 2 commits: dvdread: set the ifo format in ifoOpenASVS so ifoClose actually frees it Message-ID: <6a526c2f848c0_96e124ea7a28678484@gitlab.mail> Jean-Baptiste Kempf pushed to branch master at VideoLAN / libdvdread Commits: fba59833 by Saifelden Mohamed Ismail at 2026-07-11T18:15:09+02:00 dvdread: set the ifo format in ifoOpenASVS so ifoClose actually frees it - - - - - 17f1f079 by Saifelden Mohamed Ismail at 2026-07-11T18:15:09+02:00 dvdread: same ifo format fix for ifoOpenSAMG - - - - - 1 changed file: - src/ifo_read.c Changes: ===================================== src/ifo_read.c ===================================== @@ -687,8 +687,10 @@ ifo_handle_t *ifoOpenASVS(dvd_reader_t *ctx) { } - if (ifoRead_ASVS(&ifop->handle)) + if (ifoRead_ASVS(&ifop->handle)) { + ifop->handle.ifo_format = IFO_AUDIO; return &ifop->handle; + } Log1(ctx, "ifoOpenASVS(): Invalid ASVS IFO (AUDIO_SV.%s).", ext); ifoClose(&ifop->handle); @@ -724,8 +726,10 @@ ifo_handle_t * ifoOpenSAMG(dvd_reader_t *ctx) { } - if (ifoRead_SAMG(&ifop->handle)) + if (ifoRead_SAMG(&ifop->handle)) { + ifop->handle.ifo_format = IFO_AUDIO; return &ifop->handle; + } Log1(ctx, "ifoOpenSAMG(): Invalid SAMG IFO (AUDIO_PP.IFO)."); ifoClose(&ifop->handle); View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/4c0e1a800cda716a2b432cd66a30dfa7e835a749...17f1f079e0dbf49804b2f4b426b056a65aca4270 -- View it on GitLab: https://code.videolan.org/videolan/libdvdread/-/compare/4c0e1a800cda716a2b432cd66a30dfa7e835a749...17f1f079e0dbf49804b2f4b426b056a65aca4270 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