Bug fix of wrong video frame rate with FFmpeg 82/247882/8 accepted/tizen/unified/20201208.043851 submit/tizen/20201208.031841
authorhj kim <backto.kim@samsung.com>
Wed, 18 Nov 2020 04:24:43 +0000 (13:24 +0900)
committerhj kim <backto.kim@samsung.com>
Tue, 1 Dec 2020 08:59:38 +0000 (17:59 +0900)
Change-Id: Iff3f19a062aedad56a4c28bf9ac2036cf792ae1e

formats/ffmpeg/Makefile.am
formats/ffmpeg/mm_file_format_ffmpeg.c
packaging/libmm-fileinfo.spec

index e41fc133c707ef11ac09a6d128f0a0d5b904aef6..653a8a41de936c116041a8cabcf9cd94cb2ccfad 100755 (executable)
@@ -57,5 +57,3 @@ libmmfile_formats_la_LIBADD = $(MMCOMMON_LIBS) \
 
 libmmfile_formats_la_CFLAGS += $(DLOG_CFLAGS)
 libmmfile_formats_la_LIBADD += $(DLOG_LIBS)
-
-libmmfile_formats_la_CFLAGS += -D__MMFILE_LIBAV_VERSION__=11.4
index 8abe14dc0d88876e73bca7b17b42e59d01700459..c775a307bcc1def3eeea3c001cfbbaf1968a4129 100644 (file)
@@ -523,11 +523,10 @@ int mmfile_format_read_stream_ffmpg(MMFileFormatContext *formatContext)
                                                                                        1);
 
                                if (videoStream->framePerSec == 0) {
-#ifndef __MMFILE_LIBAV_VERSION__
-                                       videoStream->framePerSec = av_q2d(pFormatCtx->streams[i]->r_frame_rate);
-#else
-                                       videoStream->framePerSec = av_q2d(pFormatCtx->streams[i]->avg_frame_rate);
-#endif
+                                       if ((int)av_q2d(pFormatCtx->streams[i]->avg_frame_rate) != 0)
+                                               videoStream->framePerSec = av_q2d(pFormatCtx->streams[i]->avg_frame_rate);
+                                       else
+                                               videoStream->framePerSec = av_q2d(pFormatCtx->streams[i]->r_frame_rate);
                                }
 
                                videoStream->width                      = pVideoCodecCtx->width;
index b89a8c072cba060ba46856c0c95ad93fbc924670..ba4ea9c42b2a4e571a52db16abafcf0fc4b77cd1 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    1.0.0
+Version:    1.0.1
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0