bad/base/good: Fix Coverity issue 59/289859/3
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 15 Mar 2023 01:43:02 +0000 (10:43 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 16 Mar 2023 03:29:47 +0000 (12:29 +0900)
Change-Id: I26683a43ff357b2a1ee70d62fccd6da33f9b453f

packaging/gstreamer.spec
subprojects/gst-plugins-bad/gst/mpegtsmux/gstbasetsmux.c
subprojects/gst-plugins-base/ext/ogg/gstoggstream.c
subprojects/gst-plugins-base/gst/playback/gstdecodebin3.c
subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c
subprojects/gst-plugins-base/gst/playback/gsturisourcebin.c
subprojects/gst-plugins-base/meson.build
subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux.c
subprojects/gst-plugins-good/meson.build

index 05eb7f4..ab10328 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.0
-Release:        20
+Release:        21
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 880d4d5..64d191d 100644 (file)
@@ -1412,7 +1412,14 @@ gst_base_ts_mux_request_new_pad (GstElement * element, GstPadTemplate * templ,
     /* Make sure we don't use reserved PID.
      * FIXME : This should be extended to other variants (ex: ATSC) reserved PID */
     if (pid < TSMUX_START_ES_PID)
+#ifdef TIZEN_FEATURE_BUG_FIX
+   {
+      g_mutex_unlock (&mux->lock);
+#endif
       goto invalid_stream_pid;
+#ifdef TIZEN_FEATURE_BUG_FIX
+    }
+#endif
   } else {
     do {
       pid = tsmux_get_new_pid (mux->tsmux);
index a974215..9df4988 100644 (file)
@@ -1707,6 +1707,9 @@ setup_ogmvideo_mapper (GstOggStream * pad, ogg_packet * packet)
   }
   pad->granulerate_d = (gint) CLAMP (time_unit, G_MININT, G_MAXINT);
 
+#ifdef TIZEN_FEATURE_BUG_FIX
+  if (pad->granulerate_d != 0)
+#endif
   GST_LOG ("fps = %d/%d = %.3f",
       pad->granulerate_n, pad->granulerate_d,
       (double) pad->granulerate_n / pad->granulerate_d);
@@ -2664,7 +2667,7 @@ const GstOggMap mappers[] = {
     NULL,
     NULL
   },
+
 };
 /* *INDENT-ON* */
 
index d803554..9c184ae 100644 (file)
@@ -1136,7 +1136,9 @@ reset_input_parsebin (GstDecodebin3 * dbin, DecodebinInput * input)
 
   GST_DEBUG_OBJECT (dbin, "Resetting %" GST_PTR_FORMAT, input->parsebin);
 
+#ifndef TIZEN_FEATURE_BUG_FIX
   INPUT_LOCK (dbin);
+#endif
   GST_STATE_LOCK (dbin);
   gst_element_set_state (input->parsebin, GST_STATE_NULL);
   input->drained = FALSE;
@@ -1149,7 +1151,9 @@ reset_input_parsebin (GstDecodebin3 * dbin, DecodebinInput * input)
   }
   gst_element_sync_state_with_parent (input->parsebin);
   GST_STATE_UNLOCK (dbin);
+#ifndef TIZEN_FEATURE_BUG_FIX
   INPUT_UNLOCK (dbin);
+#endif
 }
 
 
index b0edb3d..7a4a2cb 100644 (file)
@@ -1124,6 +1124,9 @@ switch_and_activate_input_locked (GstURIDecodeBin3 * uridecodebin,
   }
   g_list_free (new_pads);
   g_list_free (old_pads);
+#ifdef TIZEN_FEATURE_BUG_FIX
+  g_list_free (to_activate);
+#endif
 
   /* Deactivate old input item (by removing the source components). The final
    * removal of this play item will be done once decodebin3 starts output the
index 9a78c3d..a471b4f 100644 (file)
@@ -1905,7 +1905,11 @@ setup_parsebin_for_slot (ChildSrcPadInfo * info, GstPad * originating_pad)
   info->demuxer = gst_element_factory_make ("parsebin", NULL);
   if (!info->demuxer) {
     post_missing_plugin_error (GST_ELEMENT_CAST (urisrc), "parsebin");
+#ifdef TIZEN_FEATURE_BUG_FIX
+    goto could_not_link;
+#else
     return FALSE;
+#endif
   }
   gst_element_set_locked_state (info->demuxer, TRUE);
   gst_bin_add (GST_BIN_CAST (urisrc), info->demuxer);
index f07ac2f..002d8c6 100644 (file)
@@ -398,6 +398,7 @@ core_conf.set('TIZEN_FEATURE_PLAYBIN3_MODIFICATION', true)
 core_conf.set('TIZEN_FEATURE_DISABLE_EOS_DROP', true)
 core_conf.set('TIZEN_FEATURE_MANUAL_BUFFERING_CTRL', true)
 core_conf.set('TIZEN_FEATURE_FIX_PAD_BLOCK', true)
+core_conf.set('TIZEN_FEATURE_BUG_FIX', true)
 
 tbm_dep = dependency('libtbm', required : get_option('tbm'))
 if tbm_dep.found()
index 817348d..2e45881 100644 (file)
@@ -2250,6 +2250,9 @@ gst_adaptive_demux_handle_seek_event (GstAdaptiveDemux * demux,
 
     if (gst_adaptive_demux2_stream_seek (stream, rate >= 0, stream_seek_flags,
             ts, &ts) != GST_FLOW_OK) {
+#ifdef TIZEN_FEATURE_BUG_FIX
+      GST_ADAPTIVE_DEMUX_SEGMENT_UNLOCK (demux);
+#endif
       GST_ADAPTIVE_SCHEDULER_UNLOCK (demux);
 
       GST_API_UNLOCK (demux);
index c9725be..5eb10d6 100644 (file)
@@ -468,6 +468,7 @@ cdata.set('TIZEN_FEATURE_V4L2_SKIP_ADD_COLORSPACE', true)
 cdata.set('TIZEN_FEATURE_GST_MUX_ENHANCEMENT', true)
 cdata.set('TIZEN_FEATURE_V4L2_DISABLE_COLORIMETRY', true)
 cdata.set('TIZEN_FEATURE_POST_VARIANT_INFO', true)
+cdata.set('TIZEN_FEATURE_BUG_FIX', true)
 
 if get_option('tv-profile')
   cdata.set('TIZEN_PROFILE_TV', true)