Title: [191556] releases/WebKitGTK/webkit-2.10/Source/WebCore
- Revision
- 191556
- Author
- [email protected]
- Date
- 2015-10-26 00:13:57 -0700 (Mon, 26 Oct 2015)
Log Message
Merge r191174 - [GStreamer] ASSERTION FAILED: !m_adoptionIsRequired in MediaSourceGStreamer::addSourceBuffer
https://bugs.webkit.org/show_bug.cgi?id=150229
Reviewed by Philippe Normand.
This happens in the debug bot in all media source tests that run
that code. The problem is that we are creating a RefPtr without
adopting the reference.
* platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
(WebCore::MediaSourceGStreamer::addSourceBuffer): Use
SourceBufferPrivateGStreamer::create().
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
(WebCore::SourceBufferPrivateGStreamer::create): Added to make
sure you can't create a SourceBufferPrivateGStreamer without
adopting the reference.
(WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
Takes a reference to the client instead of a PassRefPtr.
* platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (191555 => 191556)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2015-10-26 07:11:46 UTC (rev 191555)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog 2015-10-26 07:13:57 UTC (rev 191556)
@@ -1,3 +1,25 @@
+2015-10-16 Carlos Garcia Campos <[email protected]>
+
+ [GStreamer] ASSERTION FAILED: !m_adoptionIsRequired in MediaSourceGStreamer::addSourceBuffer
+ https://bugs.webkit.org/show_bug.cgi?id=150229
+
+ Reviewed by Philippe Normand.
+
+ This happens in the debug bot in all media source tests that run
+ that code. The problem is that we are creating a RefPtr without
+ adopting the reference.
+
+ * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
+ (WebCore::MediaSourceGStreamer::addSourceBuffer): Use
+ SourceBufferPrivateGStreamer::create().
+ * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp:
+ (WebCore::SourceBufferPrivateGStreamer::create): Added to make
+ sure you can't create a SourceBufferPrivateGStreamer without
+ adopting the reference.
+ (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
+ Takes a reference to the client instead of a PassRefPtr.
+ * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h:
+
2015-10-15 Dean Jackson <[email protected]>
CSSKeyframesRule::appendRule is deprecated, but is actually the spec
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp (191555 => 191556)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp 2015-10-26 07:11:46 UTC (rev 191555)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/MediaSourceGStreamer.cpp 2015-10-26 07:13:57 UTC (rev 191556)
@@ -63,9 +63,8 @@
MediaSourceGStreamer::AddStatus MediaSourceGStreamer::addSourceBuffer(const ContentType& contentType, RefPtr<SourceBufferPrivate>& sourceBufferPrivate)
{
- RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivateGStreamer = new SourceBufferPrivateGStreamer(m_client.get(), contentType);
-
- sourceBufferPrivate = adoptRef(sourceBufferPrivateGStreamer.get());
+ RefPtr<SourceBufferPrivateGStreamer> sourceBufferPrivateGStreamer = SourceBufferPrivateGStreamer::create(*m_client, contentType);
+ sourceBufferPrivate = sourceBufferPrivateGStreamer;
return m_client->addSourceBuffer(sourceBufferPrivateGStreamer, contentType);
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp (191555 => 191556)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp 2015-10-26 07:11:46 UTC (rev 191555)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp 2015-10-26 07:13:57 UTC (rev 191556)
@@ -40,9 +40,14 @@
namespace WebCore {
-SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer(PassRefPtr<MediaSourceClientGStreamer> client, const ContentType& contentType)
+Ref<SourceBufferPrivateGStreamer> SourceBufferPrivateGStreamer::create(MediaSourceClientGStreamer& client, const ContentType& contentType)
+{
+ return adoptRef(*new SourceBufferPrivateGStreamer(client, contentType));
+}
+
+SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer(MediaSourceClientGStreamer& client, const ContentType& contentType)
: m_type(contentType)
- , m_client(client)
+ , m_client(&client)
, m_readyState(MediaPlayer::HaveNothing)
{
}
Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h (191555 => 191556)
--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h 2015-10-26 07:11:46 UTC (rev 191555)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h 2015-10-26 07:13:57 UTC (rev 191556)
@@ -43,7 +43,7 @@
class SourceBufferPrivateGStreamer final : public SourceBufferPrivate {
public:
- SourceBufferPrivateGStreamer(PassRefPtr<MediaSourceClientGStreamer>, const ContentType&);
+ static Ref<SourceBufferPrivateGStreamer> create(MediaSourceClientGStreamer&, const ContentType&);
virtual ~SourceBufferPrivateGStreamer();
virtual void setClient(SourceBufferPrivateClient*);
@@ -63,6 +63,8 @@
virtual void notifyClientWhenReadyForMoreSamples(AtomicString);
private:
+ SourceBufferPrivateGStreamer(MediaSourceClientGStreamer&, const ContentType&);
+
ContentType m_type;
RefPtr<MediaSourceClientGStreamer> m_client;
SourceBufferPrivateClient* m_sourceBufferPrivateClient;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes