demux: libmp4: move uuid parsing
authorFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Jul 2017 21:52:26 +0000 (23:52 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Wed, 26 Jul 2017 22:02:47 +0000 (00:02 +0200)
modules/demux/mp4/libmp4.c

index 0eeac77..254ac79 100644 (file)
@@ -752,29 +752,6 @@ static int MP4_ReadBox_XML360( stream_t *p_stream, MP4_Box_t *p_box )
     MP4_READBOX_EXIT( 1 );
 }
 
-static int MP4_ReadBox_uuid( stream_t *p_stream, MP4_Box_t *p_box )
-{
-    if( !CmpUUID( &p_box->i_uuid, &TfrfBoxUUID ) )
-        return MP4_ReadBox_tfrf( p_stream, p_box );
-    if( !CmpUUID( &p_box->i_uuid, &TfxdBoxUUID ) )
-        return MP4_ReadBox_tfxd( p_stream, p_box );
-    if( !CmpUUID( &p_box->i_uuid, &XML360BoxUUID ) )
-        return MP4_ReadBox_XML360( p_stream, p_box );
-
-#ifdef MP4_VERBOSE
-    msg_Warn( p_stream, "Unknown uuid type box: "
-    "0x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
-    "%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x",
-    p_box->i_uuid.b[0],  p_box->i_uuid.b[1],  p_box->i_uuid.b[2],  p_box->i_uuid.b[3],
-    p_box->i_uuid.b[4],  p_box->i_uuid.b[5],  p_box->i_uuid.b[6],  p_box->i_uuid.b[7],
-    p_box->i_uuid.b[8],  p_box->i_uuid.b[9],  p_box->i_uuid.b[10], p_box->i_uuid.b[11],
-    p_box->i_uuid.b[12], p_box->i_uuid.b[13], p_box->i_uuid.b[14], p_box->i_uuid.b[15] );
-#else
-    msg_Warn( p_stream, "Unknown uuid type box" );
-#endif
-    return 1;
-}
-
 static int MP4_ReadBox_st3d( stream_t *p_stream, MP4_Box_t *p_box )
 {
     MP4_READBOX_ENTER( MP4_Box_data_st3d_t, NULL );
@@ -4187,6 +4164,31 @@ unknown:
     return 1;
 }
 
+/**** ------------------------------------------------------------------- ****/
+
+static int MP4_ReadBox_uuid( stream_t *p_stream, MP4_Box_t *p_box )
+{
+    if( !CmpUUID( &p_box->i_uuid, &TfrfBoxUUID ) )
+        return MP4_ReadBox_tfrf( p_stream, p_box );
+    if( !CmpUUID( &p_box->i_uuid, &TfxdBoxUUID ) )
+        return MP4_ReadBox_tfxd( p_stream, p_box );
+    if( !CmpUUID( &p_box->i_uuid, &XML360BoxUUID ) )
+        return MP4_ReadBox_XML360( p_stream, p_box );
+
+#ifdef MP4_VERBOSE
+    msg_Warn( p_stream, "Unknown uuid type box: "
+    "%2.2x%2.2x%2.2x%2.2x-%2.2x%2.2x-%2.2x%2.2x-"
+    "%2.2x%2.2x-%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x",
+    p_box->i_uuid.b[0],  p_box->i_uuid.b[1],  p_box->i_uuid.b[2],  p_box->i_uuid.b[3],
+    p_box->i_uuid.b[4],  p_box->i_uuid.b[5],  p_box->i_uuid.b[6],  p_box->i_uuid.b[7],
+    p_box->i_uuid.b[8],  p_box->i_uuid.b[9],  p_box->i_uuid.b[10], p_box->i_uuid.b[11],
+    p_box->i_uuid.b[12], p_box->i_uuid.b[13], p_box->i_uuid.b[14], p_box->i_uuid.b[15] );
+#else
+    msg_Warn( p_stream, "Unknown uuid type box" );
+#endif
+    return 1;
+}
+
 /**** ------------------------------------------------------------------- ****/
 /****                   "Higher level" Functions                          ****/
 /**** ------------------------------------------------------------------- ****/