Fix .wav file header not found 17/245517/3 submit/tizen/20201012.053205
authorjiyong.min <jiyong.min@samsung.com>
Mon, 12 Oct 2020 01:57:16 +0000 (10:57 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Mon, 12 Oct 2020 02:05:15 +0000 (11:05 +0900)
 - Problem
  Metadata of wav files was not extracted
 - Cause
  The wav file header was not found because of incorrect condition
 - Solution
  The condition was modified to if_fail(readed == 4)

Change-Id: I42f20d6d478e3003da3b5f28489c3ad7f39b4907

formats/ffmpeg/mm_file_format_wav.c
packaging/libmm-fileinfo.spec

index 151d9a6..0c825eb 100755 (executable)
@@ -189,7 +189,7 @@ static bool __get_fmt_subchunk_offset(MMFileIOHandle *fp, long long limit, long
        for (i = 0; i < limit; i++) {
                mmfile_seek(fp, fmt_offset + i, MMFILE_SEEK_SET);
                readed = mmfile_read(fp, buf, 4);
-               mm_file_retvm_if_fails(DEBUG, readed != 4, false);
+               mm_file_retvm_if_fails(DEBUG, readed == 4, false);
 
                if (buf[0] == 'f' && buf[1] == 'm' && buf[2] == 't' && buf[3] == ' ') {
                        *offset = fmt_offset + i;
index af21ac4..cc2fd18 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    0.6.90
+Version:    0.6.91
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0