From: hj kim Date: Fri, 30 Oct 2020 02:52:56 +0000 (+0900) Subject: Fix build errors after applying FFmpeg X-Git-Tag: accepted/tizen/unified/20201208.043851~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F85%2F246485%2F14;p=platform%2Fcore%2Fmultimedia%2Flibmm-fileinfo.git Fix build errors after applying FFmpeg multimedia library has been changed from libav(12.3) to FFmpeg(4.3.1) Change-Id: I642115a30e4848b7205e02df6ab2794fcc2296d7 --- diff --git a/formats/ffmpeg/mm_file_format_ffmpeg.c b/formats/ffmpeg/mm_file_format_ffmpeg.c index 5012afa..8abe14d 100644 --- a/formats/ffmpeg/mm_file_format_ffmpeg.c +++ b/formats/ffmpeg/mm_file_format_ffmpeg.c @@ -59,7 +59,6 @@ static int __convert_vidio_codec_type(int AVVideoCodecID) case AV_CODEC_ID_MPEG1VIDEO: return MM_VIDEO_CODEC_MPEG1; case AV_CODEC_ID_MPEG2VIDEO: /*/< preferred ID for MPEG-1/2 video decoding */ - case AV_CODEC_ID_MPEG2VIDEO_XVMC: case AV_CODEC_ID_MPEG2TS: return MM_VIDEO_CODEC_MPEG2; case AV_CODEC_ID_H261: @@ -326,8 +325,6 @@ int mmfile_format_open_ffmpg(MMFileFormatContext *formatContext) av_log_set_level(AV_LOG_QUIET); #endif - av_register_all(); - if (formatContext->filesrc->type == MM_FILE_SRC_TYPE_MEMORY) { if (mmfile_util_get_mimetype(formatContext->filesrc->memory.format, mimeType, MMFILE_MIMETYPE_MAX_LEN) != MMFILE_UTIL_SUCCESS) { debug_error(DEBUG, "error: Error in MIME Type finding"); @@ -815,8 +812,8 @@ int mmfile_format_read_frame_ffmpg(MMFileFormatContext *formatContext, unsigned /* debug_msg(RELEASE, " SMALL_LAST_FRAME: %d", pVideoCodec->capabilities & CODEC_CAP_SMALL_LAST_FRAME ? 1 : 0); */ /* debug_msg(RELEASE, " HWACCEL_VDPAU : %d", pVideoCodec->capabilities & CODEC_CAP_HWACCEL_VDPAU ? 1 : 0); */ - if (pVideoCodec->capabilities & CODEC_CAP_TRUNCATED) - pVideoCodecCtx->flags |= CODEC_FLAG_TRUNCATED; + if (pVideoCodec->capabilities & AV_CODEC_CAP_TRUNCATED) + pVideoCodecCtx->flags |= AV_CODEC_FLAG_TRUNCATED; /*set workaround bug flag*/ pVideoCodecCtx->workaround_bugs = FF_BUG_AUTODETECT; diff --git a/formats/ffmpeg/mm_file_format_frame.c b/formats/ffmpeg/mm_file_format_frame.c index 68cef9c..cc94bfe 100755 --- a/formats/ffmpeg/mm_file_format_frame.c +++ b/formats/ffmpeg/mm_file_format_frame.c @@ -520,8 +520,6 @@ int mmfile_format_get_frame(const char *path, double timestamp, bool is_accurate mm_file_retv_if_fails(width, MMFILE_FORMAT_FAIL); mm_file_retv_if_fails(height, MMFILE_FORMAT_FAIL); - av_register_all(); - /* Open video file */ mm_file_retvm_if_fails(DEBUG, avformat_open_input(&pFormatCtx, path, NULL, NULL) == 0, MMFILE_FORMAT_FAIL); @@ -548,8 +546,6 @@ int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize, mm_file_retv_if_fails(width, MMFILE_FORMAT_FAIL); mm_file_retv_if_fails(height, MMFILE_FORMAT_FAIL); - av_register_all(); - urifilename = g_strdup_printf("%s%u:%u", MMFILE_MEM_URI, (unsigned int)data, datasize); mmfile_register_io_all(); diff --git a/packaging/libmm-fileinfo.spec b/packaging/libmm-fileinfo.spec index 9e3f325..b89a8c0 100644 --- a/packaging/libmm-fileinfo.spec +++ b/packaging/libmm-fileinfo.spec @@ -1,7 +1,7 @@ Name: libmm-fileinfo Summary: Media Fileinfo -Version: 0.6.96 -Release: 1 +Version: 1.0.0 +Release: 0 Group: System/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz