Fix build error due to upgrade to ffmpeg 5.1.2 25/284925/1
authorhj kim <backto.kim@samsung.com>
Thu, 1 Dec 2022 04:31:08 +0000 (13:31 +0900)
committerhj kim <backto.kim@samsung.com>
Thu, 1 Dec 2022 04:31:12 +0000 (13:31 +0900)
Change-Id: Id13ee1645e372e5ae281fa7a80597be4bccec699

formats/ffmpeg/mm_file_format_ffmpeg.c
formats/ffmpeg/mm_file_format_frame.c
packaging/libmm-fileinfo.spec

index b571595fcafcf1ccdfefe611c22c74f60f9d58af..412612625460509d447b634a1809b311802c3cbb 100644 (file)
@@ -298,10 +298,10 @@ static int64_t __mmf_mem_seek(void *opaque, int64_t pos, int whence)
 
 int mmfile_format_open_ffmpg(MMFileFormatContext *formatContext)
 {
-       AVFormatContext     *pFormatCtx = NULL;
-       AVInputFormat       *grab_iformat = NULL;
+       AVFormatContext *pFormatCtx = NULL;
+       const AVInputFormat *grab_iformat = NULL;
        char ffmpegFormatName[MMFILE_FILE_FMT_MAX_LEN] = {0, };
-       AVIOContext          *pIOCtx = NULL;
+       AVIOContext *pIOCtx = NULL;
        MMFmemIOHandle *handle = NULL;
        uint8_t *avio_ctx_buffer = NULL;
 
@@ -563,7 +563,7 @@ int mmfile_format_read_stream_ffmpg(MMFileFormatContext *formatContext)
                        if (pAudioCodecCtx) {
                                audioStream->codecId            = __convert_audio_codec_type(pAudioCodecCtx->codec_id);
                                audioStream->bitRate            = pAudioCodecCtx->bit_rate;
-                               audioStream->nbChannel          = pAudioCodecCtx->channels;
+                               audioStream->nbChannel          = pAudioCodecCtx->ch_layout.nb_channels;
                                audioStream->samplePerSec       = pAudioCodecCtx->sample_rate;
                                audioStream->bitPerSample       = pAudioCodecCtx->bits_per_coded_sample;
                                audioStream->is_uhqa = __check_uhqa(audioStream->samplePerSec, pFormatCtx->streams[i]->codecpar->format);
@@ -785,7 +785,7 @@ int mmfile_format_read_frame_ffmpg(MMFileFormatContext *formatContext, unsigned
 {
        AVFormatContext *pFormatCtx = NULL;
        AVCodecContext *pVideoCodecCtx = NULL;
-       AVCodec *pVideoCodec = NULL;
+       const AVCodec *pVideoCodec = NULL;
        AVCodecParameters *pVideoCodecPar = NULL;
        AVFrame *pFrame = NULL;
        struct SwsContext *img_convert_ctx = NULL;
index ed2e756d1585c6e1cef79f1463945f20609127e2..ad34515072ae8e42259fbe1ac3cf04c25ac49aad 100755 (executable)
@@ -246,7 +246,7 @@ static bool __mmfile_open_video_codec(AVFormatContext *pFormatCtx, int videoStre
 {
        AVCodecContext *pVideoCodecCtx = NULL;
        AVCodecParameters *pVideoCodecPar = NULL;
-       AVCodec *pVideoCodec = NULL;
+       const AVCodec *pVideoCodec = NULL;
 
        /* Get a pointer to the codec context for the video stream */
        pVideoCodecPar = pFormatCtx->streams[videoStream]->codecpar;
@@ -540,7 +540,7 @@ int mmfile_format_get_frame_from_memory(const void *data, unsigned int datasize,
        char ffmpegFormatName[MMFILE_FILE_FMT_MAX_LEN] = {0, };
        char *urifilename = NULL;
        AVFormatContext *pFormatCtx = NULL;
-       AVInputFormat *grab_iformat = NULL;
+       const AVInputFormat *grab_iformat = NULL;
        AVIOContext *pIOCtx = NULL;
        MMFmemIOHandle *handle = NULL;
        uint8_t *avio_ctx_buffer = NULL;
index be58f11577736135325eff809b587cf325380f30..af2212a9d2a71ddb238f1ba6def823d1e4582bad 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    1.0.17
+Version:    1.0.18
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0