[libbluray-devel] navigation: when comparing playlists, compare also mark positions
hpi1
git at videolan.org
Mon Mar 7 08:51:05 CET 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Mar 4 12:19:44 2016 +0200| [adefe3ba84c614eb62632b79107643db30ec6abf] | committer: hpi1
navigation: when comparing playlists, compare also mark positions
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=adefe3ba84c614eb62632b79107643db30ec6abf
---
src/libbluray/bdnav/navigation.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index d8672b5..60eccbb 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -131,6 +131,20 @@ static int _pi_cmp(MPLS_PI *pi1, MPLS_PI *pi2)
return 0;
}
+static int _pm_cmp(MPLS_PLM *pm1, MPLS_PLM *pm2)
+{
+ if (pm1->mark_id == pm2->mark_id &&
+ pm1->mark_type == pm2->mark_type &&
+ pm1->play_item_ref == pm2->play_item_ref &&
+ pm1->time == pm2->time &&
+ pm1->entry_es_pid == pm2->entry_es_pid &&
+ pm1->duration == pm2->duration ) {
+ return 0;
+ }
+
+ return 1;
+}
+
static int _pl_cmp(MPLS_PL *pl1, MPLS_PL *pl2)
{
unsigned ii;
@@ -141,6 +155,12 @@ static int _pl_cmp(MPLS_PL *pl1, MPLS_PL *pl2)
if (pl1->mark_count != pl2->mark_count) {
return 1;
}
+
+ for (ii = 0; ii < pl1->mark_count; ii++) {
+ if (_pm_cmp(&pl1->play_mark[ii], &pl2->play_mark[ii])) {
+ return 1;
+ }
+ }
for (ii = 0; ii < pl1->list_count; ii++) {
if (_pi_cmp(&pl1->play_item[ii], &pl2->play_item[ii])) {
return 1;
More information about the libbluray-devel
mailing list