Bug fix. Incorrect width and height for specific mpegts 53/320753/2 accepted/tizen_9.0_unified tizen_9.0 accepted/tizen/9.0/unified/20250310.161043
authorJiyong <jiyong.min@samsung.com>
Tue, 4 Mar 2025 23:45:33 +0000 (08:45 +0900)
committerJiyong <jiyong.min@samsung.com>
Fri, 7 Mar 2025 03:22:48 +0000 (12:22 +0900)
[Cause]
 - Side effect of reducing the probesize for mpegts
[Solution]
 - Adjust the probesize for mpegts

Change-Id: I3b1090b5eee9426ba0119d553e33549a755de9a2

formats/ffmpeg/mm_file_format_ffmpeg.c
mm_file_config.ini
packaging/libmm-fileinfo.spec
utils/include/mm_file_utils.h

index c3e01e94624cac0abf4e6466cd16b71f78589a51..a6f7165c17cfc08f541de3d77899e50d80f2f4dd 100644 (file)
@@ -36,6 +36,7 @@
 
 static int g_max_analyze_duration = 0;
 static int g_probesize = 0;
+static int g_probesize_mpegts = 0;
 
 #ifdef __MMFILE_TEST_MODE__
 static void _dump_av_packet(AVPacket *pkt)
@@ -474,10 +475,17 @@ int mmfile_format_read_stream_ffmpg(MMFileFormatContext *formatContext)
                g_max_analyze_duration = mmfile_get_int_from_ini(MMFILE_INI_MAXANLDURATION, MMFILE_DEFAULT_MAXANLDURATION);
        if (g_probesize == 0)
                g_probesize = mmfile_get_int_from_ini(MMFILE_INI_PROBESIZE, MMFILE_DEFAULT_PROBESIZE);
-
-       if (formatContext->formatType == MM_FILE_FORMAT_M2TS)
-               pFormatCtx->max_analyze_duration = g_max_analyze_duration;      // MPEGTS file timeout set
-       pFormatCtx->probesize = g_probesize;    // the size of the data(packet) to probe stream information
+       if (g_probesize_mpegts == 0)
+               g_probesize_mpegts = mmfile_get_int_from_ini(MMFILE_INI_PROBESIZE_MPEGTS, MMFILE_DEFAULT_PROBESIZE_MPEGTS);
+
+       if (formatContext->formatType == MM_FILE_FORMAT_M2TS) {
+               // set the duration of the data to read
+               pFormatCtx->max_analyze_duration = g_max_analyze_duration;
+               // set the number of the bytes to probe stream information
+               pFormatCtx->probesize = g_probesize_mpegts;
+       } else {
+               pFormatCtx->probesize = g_probesize;
+       }
 
        debug_msg(RELEASE, "max_analyze_duration: %"PRId64", probesize: %"PRId64"", pFormatCtx->max_analyze_duration, pFormatCtx->probesize);
 
index 5906563d41d8938186f359caa9ef52f767509051..3608cd43ce3df631cf5d49f1a03d6aad669904eb 100644 (file)
@@ -8,3 +8,4 @@
 junk_counter_limit=1000
 max_analyze_duration=100000
 probesize=50000
+probesize_for_mpegts=265000
index 3351441c3c3f3721bb62549ee06b12eecdbce947..b020685f57aa6ffff3d9da5441da2705f53f0123 100644 (file)
@@ -1,6 +1,6 @@
 Name:      libmm-fileinfo
 Summary:    Media Fileinfo
-Version:    1.1.1
+Version:    1.1.2
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 904ec2e4b6bbd14f54060e64471000b31202352a..a42a5ea7b52c6fe5e55e6dbe1b5bc77afa04b14d 100755 (executable)
@@ -149,14 +149,16 @@ int                       mmfile_close(MMFileIOHandle *h);
 /*////////////////////////////////////////////////////////////////////// */
 /*                            INI  API                               // */
 /*////////////////////////////////////////////////////////////////////// */
-#define MMFILE_INI_PATH                "/etc/multimedia/mm_file_config.ini"
-#define MMFILE_INI_JUNKCNTLIMIT                "mm-file-config:junk_counter_limit"
-#define MMFILE_INI_MAXANLDURATION      "mm-file-config:max_analyze_duration"
-#define MMFILE_INI_PROBESIZE           "mm-file-config:probesize"
-
-#define MMFILE_DEFAULT_JUNKCNTLIMIT            1000
-#define MMFILE_DEFAULT_MAXANLDURATION  100000
-#define MMFILE_DEFAULT_PROBESIZE               1000
+#define MMFILE_INI_PATH              "/etc/multimedia/mm_file_config.ini"
+#define MMFILE_INI_JUNKCNTLIMIT      "mm-file-config:junk_counter_limit"
+#define MMFILE_INI_MAXANLDURATION    "mm-file-config:max_analyze_duration"
+#define MMFILE_INI_PROBESIZE         "mm-file-config:probesize"
+#define MMFILE_INI_PROBESIZE_MPEGTS  "mm-file-config:probesize_for_mpegts"
+
+#define MMFILE_DEFAULT_JUNKCNTLIMIT      1000
+#define MMFILE_DEFAULT_MAXANLDURATION    100000
+#define MMFILE_DEFAULT_PROBESIZE         50000
+#define MMFILE_DEFAULT_PROBESIZE_MPEGTS  300000
 
 int mmfile_get_int_from_ini(const char *key, int notfound);