From 283fa6bf53869cb2b1309cfd3d5173fda2c615ee Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Fri, 7 Dec 2018 12:45:39 +0900 Subject: [PATCH] Fix format error in logs Change-Id: I024c8d532c47c3a58aa13f4b6e5fa5c6a647d7a2 --- formats/ffmpeg/mm_file_format_ffmpeg.c | 4 ++-- formats/ffmpeg/mm_file_format_frame.c | 2 +- utils/mm_file_util_tag.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/formats/ffmpeg/mm_file_format_ffmpeg.c b/formats/ffmpeg/mm_file_format_ffmpeg.c index 81bb2a1..3596415 100755 --- a/formats/ffmpeg/mm_file_format_ffmpeg.c +++ b/formats/ffmpeg/mm_file_format_ffmpeg.c @@ -412,13 +412,13 @@ int mmfile_format_read_stream_ffmpg(MMFileFormatContext *formatContext) goto exception; } - debug_msg(RELEASE, "FFMPEG: dur %lld, start %lld\n", pFormatCtx->duration, pFormatCtx->start_time); + debug_msg(RELEASE, "FFMPEG: dur %"PRId64", start %"PRId64"\n", pFormatCtx->duration, pFormatCtx->start_time); /** *@note asf has long duration bug. and Some content's start time is wrong(negative number). */ if (pFormatCtx->start_time < 0) { - debug_warning(DEBUG, "Wrong Start time = %lld\n", pFormatCtx->start_time); + debug_warning(DEBUG, "Wrong Start time = %"PRId64"\n", pFormatCtx->start_time); formatContext->duration = (long long)(pFormatCtx->duration) * 1000 / AV_TIME_BASE; } else { formatContext->duration = (long long)(pFormatCtx->duration + pFormatCtx->start_time) * 1000 / AV_TIME_BASE; diff --git a/formats/ffmpeg/mm_file_format_frame.c b/formats/ffmpeg/mm_file_format_frame.c index 934b365..a0f112c 100755 --- a/formats/ffmpeg/mm_file_format_frame.c +++ b/formats/ffmpeg/mm_file_format_frame.c @@ -482,7 +482,7 @@ static int __mmfile_get_frame(AVFormatContext *pFormatCtx, int64_t timestamp, bo #endif duration = duration * MILLION; if ((duration <= 0) || (duration <= pos)) { - debug_error(DEBUG, "duration error duration[%f] pos[%lld]", duration, pos); + debug_error(DEBUG, "duration error duration[%f] pos[%"PRId64"]", duration, pos); ret = MMFILE_FORMAT_FAIL; goto exception; } diff --git a/utils/mm_file_util_tag.c b/utils/mm_file_util_tag.c index cd823ba..5f74573 100755 --- a/utils/mm_file_util_tag.c +++ b/utils/mm_file_util_tag.c @@ -443,7 +443,7 @@ static int GetAlbumFromAlbumTagBox(MMFileFormatContext *formatContext, MMFileIOH else mmfile_free(temp_text); - debug_msg(RELEASE, "formatContext->album=%s, strlen=%d\n", formatContext->album, strlen(formatContext->album)); + debug_msg(RELEASE, "formatContext->album=%s, strlen=%zu\n", formatContext->album, strlen(formatContext->album)); } if (trackFlags) { @@ -1243,7 +1243,7 @@ static int GetVideoV2MetadataFromAvc1TagBox(MMFileFormatContext *formatContext, if (buffer[i] == 's' && buffer[i + 1] == 'v' && buffer[i + 2] == 'h' && buffer[i + 3] == 'd') { debug_warning(DEBUG, "svhd data found at offset %lld\n", basic_header->start_offset + i); ParseSvhdData(formatContext, fp, basic_header->start_offset + i + 4, mmfile_io_be_uint32(*((uint32_t*)(buffer - 4 + i)))); - debug_msg(RELEASE, "formatContext->metadataSourceV2 = %s (length = %d)", formatContext->metadataSourceV2, strlen(formatContext->metadataSourceV2)); + debug_msg(RELEASE, "formatContext->metadataSourceV2 = %s (length = %zu)", formatContext->metadataSourceV2, strlen(formatContext->metadataSourceV2)); } if (buffer[i] == 'p' && buffer[i + 1] == 'r' && buffer[i + 2] == 'o' && buffer[i + 3] == 'j') { debug_warning(DEBUG, "proj data found at offset %lld\n", basic_header->start_offset + i); -- 2.7.4