[libbluray-devel] fixed _find_repeats() when title is composed from segments of single m2ts file

hpi1 git at videolan.org
Wed Jan 16 11:43:33 CET 2013


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Jan 16 12:40:06 2013 +0200| [ddfe06418f57892e211d0a5b38918877181767ec] | committer: hpi1

fixed _find_repeats() when title is composed from segments of single m2ts file

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ddfe06418f57892e211d0a5b38918877181767ec
---

 src/libbluray/bdnav/navigation.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index 5bfb239..b4e6971 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -64,7 +64,7 @@ static int _filter_dup(MPLS_PL *pl_list[], unsigned count, MPLS_PL *pl)
 }
 
 static unsigned int
-_find_repeats(MPLS_PL *pl, const char *m2ts)
+_find_repeats(MPLS_PL *pl, const char *m2ts, uint32_t in_time, uint32_t out_time)
 {
     unsigned ii, count = 0;
 
@@ -73,7 +73,9 @@ _find_repeats(MPLS_PL *pl, const char *m2ts)
 
         pi = &pl->play_item[ii];
         // Ignore titles with repeated segments
-        if (strcmp(pi->clip[0].clip_id, m2ts) == 0) {
+        if (strcmp(pi->clip[0].clip_id, m2ts) == 0 &&
+            pi->in_time  == in_time &&
+            pi->out_time == out_time) {
           count++;
         }
     }
@@ -90,7 +92,7 @@ _filter_repeats(MPLS_PL *pl, unsigned repeats)
 
       pi = &pl->play_item[ii];
       // Ignore titles with repeated segments
-      if (_find_repeats(pl, pi->clip[0].clip_id) > repeats) {
+      if (_find_repeats(pl, pi->clip[0].clip_id, pi->in_time, pi->out_time) > repeats) {
         return 0;
       }
     }



More information about the libbluray-devel mailing list