Title: [220861] trunk/Source/WebCore
- Revision
- 220861
- Author
- zandober...@gmail.com
- Date
- 2017-08-17 09:37:28 -0700 (Thu, 17 Aug 2017)
Log Message
[GStreamer] GstStructure shouldn't be handled through GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=175673
Reviewed by Xabier Rodriguez-Calvar.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(webkitMediaCommonEncryptionDecryptTransformCaps): GstStructure isn't
ref-counted, so it should be handled through the GUniquePtr<GstStructure>
smart pointer.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (220860 => 220861)
--- trunk/Source/WebCore/ChangeLog 2017-08-17 16:17:19 UTC (rev 220860)
+++ trunk/Source/WebCore/ChangeLog 2017-08-17 16:37:28 UTC (rev 220861)
@@ -1,3 +1,15 @@
+2017-08-17 Zan Dobersek <zdober...@igalia.com>
+
+ [GStreamer] GstStructure shouldn't be handled through GRefPtr
+ https://bugs.webkit.org/show_bug.cgi?id=175673
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
+ (webkitMediaCommonEncryptionDecryptTransformCaps): GstStructure isn't
+ ref-counted, so it should be handled through the GUniquePtr<GstStructure>
+ smart pointer.
+
2017-08-17 Youenn Fablet <you...@apple.com>
[Mac/iOS] Increase the audio buffer size when audio capture is on but web audio is not used
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp (220860 => 220861)
--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp 2017-08-17 16:17:19 UTC (rev 220860)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp 2017-08-17 16:37:28 UTC (rev 220861)
@@ -26,6 +26,7 @@
#if ENABLE(ENCRYPTED_MEDIA) && USE(GSTREAMER)
#include "GRefPtrGStreamer.h"
+#include "GUniquePtrGStreamer.h"
#include <wtf/Condition.h>
#include <wtf/RunLoop.h>
@@ -112,13 +113,13 @@
unsigned size = gst_caps_get_size(caps);
for (unsigned i = 0; i < size; ++i) {
GstStructure* incomingStructure = gst_caps_get_structure(caps, i);
- GRefPtr<GstStructure> outgoingStructure = nullptr;
+ GUniquePtr<GstStructure> outgoingStructure = nullptr;
if (direction == GST_PAD_SINK) {
if (!gst_structure_has_field(incomingStructure, "original-media-type"))
continue;
- outgoingStructure = adoptGRef(gst_structure_copy(incomingStructure));
+ outgoingStructure = GUniquePtr<GstStructure>(gst_structure_copy(incomingStructure));
gst_structure_set_name(outgoingStructure.get(), gst_structure_get_string(outgoingStructure.get(), "original-media-type"));
// Filter out the DRM related fields from the down-stream caps.
@@ -130,7 +131,7 @@
gst_structure_remove_field(outgoingStructure.get(), fieldName);
}
} else {
- outgoingStructure = adoptGRef(gst_structure_copy(incomingStructure));
+ outgoingStructure = GUniquePtr<GstStructure>(gst_structure_copy(incomingStructure));
// Filter out the video related fields from the up-stream caps,
// because they are not relevant to the input caps of this element and
// can cause caps negotiation failures with adaptive bitrate streams.
@@ -168,7 +169,7 @@
}
if (!duplicate)
- gst_caps_append_structure(transformedCaps, outgoingStructure.leakRef());
+ gst_caps_append_structure(transformedCaps, outgoingStructure.release());
}
if (filter) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes