[libbluray-devel] Cosmetics (reorder functions)

hpi1 git at videolan.org
Mon Aug 27 08:33:08 CEST 2018


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sat Jan 20 14:09:41 2018 +0200| [a3e7839ab37559c04c34793ce75e6388305a3239] | committer: hpi1

Cosmetics (reorder functions)

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

 src/libbluray/bdnav/navigation.c | 76 ++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/libbluray/bdnav/navigation.c b/src/libbluray/bdnav/navigation.c
index 82919c40..6a37e8eb 100644
--- a/src/libbluray/bdnav/navigation.c
+++ b/src/libbluray/bdnav/navigation.c
@@ -655,6 +655,44 @@ static void _fill_clip(NAV_TITLE *title,
     clip->stc_spn = clpi_find_stc_spn(clip->cl, mpls_clip[clip->angle].stc_id);
 }
 
+static
+void _nav_title_close(NAV_TITLE *title)
+{
+    unsigned ii, ss;
+
+    if (title->sub_path) {
+        for (ss = 0; ss < title->sub_path_count; ss++) {
+            if (title->sub_path[ss].clip_list.clip) {
+                for (ii = 0; ii < title->sub_path[ss].clip_list.count; ii++) {
+                    clpi_free(&title->sub_path[ss].clip_list.clip[ii].cl);
+                }
+                X_FREE(title->sub_path[ss].clip_list.clip);
+            }
+        }
+        X_FREE(title->sub_path);
+    }
+
+    if (title->clip_list.clip) {
+        for (ii = 0; ii < title->clip_list.count; ii++) {
+            clpi_free(&title->clip_list.clip[ii].cl);
+        }
+        X_FREE(title->clip_list.clip);
+    }
+
+    mpls_free(&title->pl);
+    X_FREE(title->chap_list.mark);
+    X_FREE(title->mark_list.mark);
+    X_FREE(title);
+}
+
+void nav_title_close(NAV_TITLE **title)
+{
+    if (*title) {
+        _nav_title_close(*title);
+        *title = NULL;
+    }
+}
+
 NAV_TITLE* nav_title_open(BD_DISC *disc, const char *playlist, unsigned angle)
 {
     NAV_TITLE *title = NULL;
@@ -736,44 +774,6 @@ NAV_TITLE* nav_title_open(BD_DISC *disc, const char *playlist, unsigned angle)
     return title;
 }
 
-static
-void _nav_title_close(NAV_TITLE *title)
-{
-    unsigned ii, ss;
-
-    if (title->sub_path) {
-        for (ss = 0; ss < title->sub_path_count; ss++) {
-            if (title->sub_path[ss].clip_list.clip) {
-                for (ii = 0; ii < title->sub_path[ss].clip_list.count; ii++) {
-                    clpi_free(&title->sub_path[ss].clip_list.clip[ii].cl);
-                }
-                X_FREE(title->sub_path[ss].clip_list.clip);
-            }
-        }
-        X_FREE(title->sub_path);
-    }
-
-    if (title->clip_list.clip) {
-        for (ii = 0; ii < title->clip_list.count; ii++) {
-            clpi_free(&title->clip_list.clip[ii].cl);
-        }
-        X_FREE(title->clip_list.clip);
-    }
-
-    mpls_free(&title->pl);
-    X_FREE(title->chap_list.mark);
-    X_FREE(title->mark_list.mark);
-    X_FREE(title);
-}
-
-void nav_title_close(NAV_TITLE **title)
-{
-    if (*title) {
-        _nav_title_close(*title);
-        *title = NULL;
-    }
-}
-
 // Search for random access point closest to the requested packet
 // Packets are 192 byte TS packets
 NAV_CLIP* nav_chapter_search(NAV_TITLE *title, unsigned chapter, uint32_t *clip_pkt, uint32_t *out_pkt)



More information about the libbluray-devel mailing list