Bug 973744 - Remove matroska seek hack in the gstreamer media backend. r=edwin
authorAlessandro Decina <alessandro.d@gmail.com>
Wed, 19 Feb 2014 11:30:09 -0500
changeset 169878 98d81d6422dd19e8799871144b8d05d2f27b279c
parent 169877 795b23c31b4d0b099186c0147146d452343c0697
child 169879 1a5dbdd480ffda4087b2c829f125f3b9487ce1f0
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewersedwin
bugs973744
milestone30.0a1
Bug 973744 - Remove matroska seek hack in the gstreamer media backend. r=edwin
content/media/gstreamer/GStreamerReader.cpp
--- a/content/media/gstreamer/GStreamerReader.cpp
+++ b/content/media/gstreamer/GStreamerReader.cpp
@@ -367,37 +367,16 @@ nsresult GStreamerReader::ReadMetadata(M
 
   if (NS_SUCCEEDED(ret))
     ret = CheckSupportedFormats();
 
   if (NS_FAILED(ret))
     /* we couldn't get this to play */
     return ret;
 
-  /* FIXME: workaround for a bug in matroskademux. This seek makes matroskademux
-   * parse the index */
-  LOG(PR_LOG_DEBUG, ("doing matroskademux seek hack"));
-  if (gst_element_seek_simple(mPlayBin, GST_FORMAT_TIME,
-        GST_SEEK_FLAG_FLUSH, 0)) {
-    /* after a seek we need to wait again for ASYNC_DONE */
-    message = gst_bus_timed_pop_filtered(mBus, 5 * GST_SECOND,
-       (GstMessageType)(GST_MESSAGE_ASYNC_DONE | GST_MESSAGE_ERROR));
-    if (message == NULL || GST_MESSAGE_TYPE(message) != GST_MESSAGE_ASYNC_DONE) {
-      LOG(PR_LOG_DEBUG, ("matroskademux seek hack failed: %p", message));
-      gst_element_set_state(mPlayBin, GST_STATE_NULL);
-      if (message) {
-        gst_message_unref(message);
-      }
-      return NS_ERROR_FAILURE;
-    }
-    LOG(PR_LOG_DEBUG, ("matroskademux seek hack completed"));
-  } else {
-    LOG(PR_LOG_DEBUG, ("matroskademux seek hack failed (non fatal)"));
-  }
-
   bool isMP3 = mDecoder->GetResource()->GetContentType().EqualsASCII(AUDIO_MP3);
   if (isMP3) {
     ParseMP3Headers();
   }
 
   /* report the duration */
   gint64 duration;