[libbluray-devel] main playlist selection: prefer UHD

hpi1 git at videolan.org
Fri Dec 1 11:39:56 CET 2017


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Dec  1 12:38:56 2017 +0200| [644629af8994c33c674e6da6a4281447d4c6b121] | committer: hpi1

main playlist selection: prefer UHD

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

 src/libbluray/bdnav/navigation.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index 0c6d0157..67dc866f 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -244,7 +244,12 @@ static void _video_props(MPLS_STN *s, int *full_hd, int *mpeg12)
             *mpeg12 = 0;
         }
         if (s->video[ii].format == BD_VIDEO_FORMAT_1080I || s->video[ii].format == BD_VIDEO_FORMAT_1080P) {
-            *full_hd = 1;
+            if (*full_hd < 1) {
+                *full_hd = 1;
+            }
+        }
+        if (s->video[ii].format == BD_VIDEO_FORMAT_2160P) {
+            *full_hd = 2;
         }
     }
 }
@@ -269,7 +274,7 @@ static int _cmp_video_props(const MPLS_PL *p1, const MPLS_PL *p2)
     _video_props(s1, &fhd1, &mp12_1);
     _video_props(s2, &fhd2, &mp12_2);
 
-    /* prefer Full HD over HD/SD */
+    /* prefer UHD over FHD over HD/SD */
     if (fhd1 != fhd2)
         return fhd2 - fhd1;
 



More information about the libbluray-devel mailing list