[libbluray-devel] Fix for wrong title index used in some BDs

tourettes tourettesmp at gmail.com
Tue Mar 15 16:36:45 CET 2011


Hi,

Some BDs have .mpls file indices that aren't continuos. For example one 
BD has 00001, 00002, 00003, 00004, 00006 & 00007 .mpls (00005 is missing).

Current implementation is using the atoi to convert the filename 
directly into the title index where as the proposed patch is using 
bd->title_idx. I have tested this patch with approx 20 BDs and it seems 
to work fine. Now BD_EVENT_PLAYLIST's parameter is providing the correct 
title index and it can be used to query the currently active title 
information.

I'm not sure if that is the correct way to fix the issue, maybe there 
are some other parts in the library that are generating the filename 
based on that index information and in that case we should have "ghost" 
entries in the title list to fill in those missing .mpls files.


 From d2f5137724263531594306adf7587fd75e197c47 Mon Sep 17 00:00:00 2001
From: tourettes <tourettesmp at gmail.com>
Date: Tue, 15 Mar 2011 16:13:47 +0200
Subject: [PATCH] Fixed _open_playlist - wrong tile index was used
  On BDs that have "jumps" in the .mpls filename numbering a wrong title 
index could be used.

---
  src/libbluray/bluray.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libbluray/bluray.c b/src/libbluray/bluray.c
index 138ab01..0af8eaa 100644
--- a/src/libbluray/bluray.c
+++ b/src/libbluray/bluray.c
@@ -1243,7 +1243,7 @@ static int _open_playlist(BLURAY *bd, const char 
*f_name)

      bd->next_chapter_start = bd_chapter_pos(bd, 1);

-    bd_psr_write(bd->regs, PSR_PLAYLIST, atoi(bd->title->name));
+    bd_psr_write(bd->regs, PSR_PLAYLIST, bd->title_idx);
      bd_psr_write(bd->regs, PSR_ANGLE_NUMBER, bd->title->angle + 1);
      bd_psr_write(bd->regs, PSR_CHAPTER, 1);



More information about the libbluray-devel mailing list