adaptivedemux/mpegdemux : Fix coverity issue (Missing unlock)
[platform/upstream/gstreamer.git] / gst / mpegdemux / gstmpegdemux.c
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;
   }