Support smta value 0x02 27/200527/2
authorhj kim <backto.kim@samsung.com>
Tue, 26 Feb 2019 07:36:40 +0000 (16:36 +0900)
committerhj kim <backto.kim@samsung.com>
Wed, 27 Feb 2019 01:48:36 +0000 (10:48 +0900)
Change-Id: I7dc1f10917a706e03447a97b5ef69d945064d664

tests/mm_file_test.c
utils/mm_file_util_tag.c

index 4f99f34..befb058 100755 (executable)
@@ -112,7 +112,7 @@ typedef struct _TagContext {
        mmfile_value_t equi_projection_bounds_bottom_v2;
        mmfile_value_t equi_projection_bounds_left_v2;
        mmfile_value_t equi_projection_bounds_right_v2;
-
+       mmfile_value_t smta;
 } TagContext_t;
 
 typedef struct _ContentContext {
@@ -414,6 +414,7 @@ static int mmfile_get_file_infomation(void *data, void *user_data, bool file_tes
                                                MM_FILE_TAG_SPHERICAL_V2_EQUI_BOUNDS_BOTTOM, &ctag.equi_projection_bounds_bottom_v2.value.i_val,
                                                MM_FILE_TAG_SPHERICAL_V2_EQUI_BOUNDS_LEFT, &ctag.equi_projection_bounds_left_v2.value.i_val,
                                                MM_FILE_TAG_SPHERICAL_V2_EQUI_BOUNDS_RIGHT, &ctag.equi_projection_bounds_right_v2.value.i_val,
+                                               MM_FILE_TAG_SMTA, &ctag.smta.value.i_val,
                                                NULL);
                if (ret != FILEINFO_ERROR_NONE &&  err_attr_name) {
                        printf("failed to get %s attrs\n", err_attr_name);
@@ -498,6 +499,8 @@ static int mmfile_get_file_infomation(void *data, void *user_data, bool file_tes
                        printf("# equi_projection_bounds_right_v2: [%d]\n", ctag.equi_projection_bounds_right_v2.value.i_val);
                }
 
+               printf("# smta: [%d]\n", ctag.smta.value.i_val);
+
                if (ctag.synclyrics_size.value.i_val > 0) {
                        int idx = 0;
                        unsigned long time_info = 0;
index 96d6eb8..62e8ece 100755 (executable)
@@ -810,8 +810,11 @@ static int GetSAUTInfoFromSMTATagBox(MMFileFormatContext *formatContext, MMFileI
                if (smtaTag.value == 0x01) {
                        debug_msg(RELEASE, "This has saut tag and valid value");
                        formatContext->smta = 1;
+               } else if (smtaTag.value == 0x02) {
+                       debug_msg(RELEASE, "This has saut tag and valid value");
+                       formatContext->smta = 2;
                } else {
-                       debug_error(DEBUG, "This has saut tag and but invalid value");
+                       debug_error(DEBUG, "This has saut tag but invalid value");
                        goto exception;
                }
        } else {