Add error log 60/240960/1 accepted/tizen/unified/20200814.123126 submit/tizen/20200813.074050
authorJeongmo Yang <jm80.yang@samsung.com>
Thu, 13 Aug 2020 07:21:19 +0000 (16:21 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Thu, 13 Aug 2020 07:21:19 +0000 (16:21 +0900)
[Version] 0.1.17
[Issue Type] Update

Change-Id: Ideede05bca522315ea677037fbaffc6e05c00393
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-tool.spec
src/media_format.c

index c6f3f6ddc9a1e24725ebaa15f33d0d28e706769c..c0de065d567047ca8e2441ff01658edce4bf9267 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       capi-media-tool
 Summary:    A Core API media tool library in Tizen Native API
-Version:    0.1.16
-Release:    1
+Version:    0.1.17
+Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index f440fc49341950f8ab59b2f8e7dfc45fb318665e..1e8cea88cc7b1d2a9fc871a085b5ea3f7a046270 100644 (file)
@@ -987,8 +987,10 @@ int media_format_channel_positions_to_mask(media_format_h fmt, const media_forma
        media_format_s *fmt_handle;
        fmt_handle = (media_format_s *)fmt;
 
-       if (!fmt_handle->detail.audio.channel)
+       if (!fmt_handle->detail.audio.channel) {
+               LOGE("fmt_handle->detail.audio.channel %d", fmt_handle->detail.audio.channel);
                return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+       }
 
        if (fmt_handle->detail.audio.channel == 1 && position[0] == MEDIA_FORMAT_CHANNEL_POSITION_MONO) {
                if (channel_mask_out)
@@ -1010,16 +1012,22 @@ int media_format_channel_positions_to_mask(media_format_h fmt, const media_forma
 
                if (position[i] == MEDIA_FORMAT_CHANNEL_POSITION_INVALID ||
                        position[i] == MEDIA_FORMAT_CHANNEL_POSITION_MONO ||
-                       position[i] == MEDIA_FORMAT_CHANNEL_POSITION_NONE)
+                       position[i] == MEDIA_FORMAT_CHANNEL_POSITION_NONE) {
+                       LOGE("position[%d] %d", i, position[i]);
                        return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               }
 
                /* Is this in valid channel order? */
-               if (j == G_N_ELEMENTS(default_channel_order))
+               if (j == G_N_ELEMENTS(default_channel_order)) {
+                       LOGE("j %d", j);
                        return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               }
                j++;
 
-               if ((channel_mask & (G_GUINT64_CONSTANT(1) << position[i])))
+               if ((channel_mask & (G_GUINT64_CONSTANT(1) << position[i]))) {
+                       LOGE("channel_mask 0x%x, position[%d] %d", channel_mask, i, position[i]);
                        return MEDIA_FORMAT_ERROR_INVALID_OPERATION;
+               }
 
                channel_mask |= (G_GUINT64_CONSTANT(1) << position[i]);
        }