adaptivedemux/mpegdemux : Fix coverity issue (Missing unlock)
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 15 Sep 2020 07:25:49 +0000 (16:25 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Wed, 16 Sep 2020 00:51:05 +0000 (09:51 +0900)
Change-Id: I51fea48a0d00b2a38e136e03fa5f7b3a537440da

gst-libs/gst/adaptivedemux/gstadaptivedemux.c
gst/mpegdemux/gstmpegdemux.c
packaging/gst-plugins-bad.spec

index f8ad42a..ebf26aa 100644 (file)
@@ -1008,6 +1008,9 @@ gst_adaptive_demux_handle_message (GstBin * bin, GstMessage * msg)
         if (stream == NULL) {
           GST_WARNING_OBJECT (demux,
               "Failed to locate stream for errored element");
+#ifdef TIZEN_FEATURE_ADAPTIVE_MODIFICATION
+          GST_MANIFEST_UNLOCK (demux);
+#endif
           break;
         }
       }
@@ -2620,7 +2623,7 @@ gst_adaptive_demux_stream_push_buffer (GstAdaptiveDemuxStream * stream,
   GstEvent *pending_caps = NULL, *pending_segment = NULL, *pending_tags = NULL;
   GList *pending_events = NULL;
 
-  /* FIXME : 
+  /* FIXME :
    * This is duplicating *exactly* the same thing as what is done at the beginning
    * of _src_chain if starting_fragment is TRUE */
   if (stream->first_fragment_buffer) {
index cbcfb79..2cc024e 100644 (file)
@@ -773,7 +773,7 @@ gst_ps_demux_handle_dvd_event (GstPsDemux * demux, GstEvent * event)
     /* Create a video pad to ensure have it before emit no more pads */
     (void) gst_ps_demux_get_stream (demux, 0xe0, ST_VIDEO_MPEG2);
 
-    /* Read out the languages for audio streams and request each one that 
+    /* Read out the languages for audio streams and request each one that
      * is present */
     for (i = 0; i < MAX_DVD_AUDIO_STREAMS; i++) {
       gint stream_format;
@@ -1281,7 +1281,11 @@ gst_ps_demux_handle_seek_pull (GstPsDemux * demux, GstEvent * event)
   if (flush || seeksegment.position != demux->src_segment.position) {
     /* Do the actual seeking */
     if (!gst_ps_demux_do_seek (demux, &seeksegment)) {
+#ifdef TIZEN_FEATURE_MPEGDEMUX_MODIFICATION
+      goto seek_error;
+#else
       return FALSE;
+#endif
     }
   }
 
@@ -1346,6 +1350,9 @@ no_scr_rate:
 seek_error:
   {
     GST_WARNING_OBJECT (demux, "couldn't perform seek");
+#ifdef TIZEN_FEATURE_MPEGDEMUX_MODIFICATION
+    GST_PAD_STREAM_UNLOCK (demux->sinkpad);
+#endif
     gst_event_unref (event);
     return FALSE;
   }
index bab10ea..0ebdb4e 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:           gst-plugins-bad
 Version:        1.16.2
-Release:        2
+Release:        3
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -83,6 +83,7 @@ export CFLAGS+=" -Wall -g -fPIC\
   -DTIZEN_FEATURE_ADAPTIVE_MODIFICATION\
   -DTIZEN_FEATURE_TSDEMUX_MODIFICATION\
   -DTIZEN_FEATURE_OALSINK_MODIFICATION\
+  -DTIZEN_FEATURE_MPEGDEMUX_MODIFICATION\
   -DTIZEN_FEATURE_UPSTREAM\
   -fstack-protector-strong\
   -Wl,-z,relro\