From: Jeongmo Yang Date: Thu, 13 Aug 2020 07:21:19 +0000 (+0900) Subject: Add error log X-Git-Tag: submit/tizen/20200813.074050^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0c29816854b9c0761157dbd5f5b7411c19e8304;p=platform%2Fcore%2Fapi%2Fmediatool.git Add error log [Version] 0.1.17 [Issue Type] Update Change-Id: Ideede05bca522315ea677037fbaffc6e05c00393 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/capi-media-tool.spec b/packaging/capi-media-tool.spec index c6f3f6d..c0de065 100755 --- a/packaging/capi-media-tool.spec +++ b/packaging/capi-media-tool.spec @@ -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 diff --git a/src/media_format.c b/src/media_format.c index f440fc4..1e8cea8 100644 --- a/src/media_format.c +++ b/src/media_format.c @@ -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]); }