subparse: resolve seek issue 69/201469/1
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 14 Mar 2019 10:24:03 +0000 (19:24 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Thu, 14 Mar 2019 10:24:07 +0000 (19:24 +0900)
- fixed side issue of below patch
  94a453e5733b45bde5a8faf1e2d32cec292d5f09

Change-Id: Ifc8d5fc1411d265cecfaf9104f29d5a3132b67ac

gst/subparse/gstsubparse.c

index 3fd1d9d..5008e98 100644 (file)
@@ -1958,12 +1958,16 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       const GstSegment *s;
 
 #ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
-      if (!SUBPARSE_SEEK_TRYLOCK (self)) {
-        /* new seeking request is in process */
-        GST_WARNING_OBJECT (self, "ignore the old newsegment event");
-        ret = TRUE;
-        gst_event_unref (event);
-        break;
+      if (self->first_buffer) {
+        if (!SUBPARSE_SEEK_TRYLOCK (self)) {
+          /* new seeking request is in process */
+          GST_WARNING_OBJECT (self, "ignore the old newsegment event");
+          ret = TRUE;
+          gst_event_unref (event);
+          break;
+        }
+      } else {
+        SUBPARSE_SEEK_LOCK (self);
       }
 #endif