Changeset 231891 in webkit
- Timestamp:
- May 17, 2018 1:16:40 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r231881 r231891 1 2018-05-17 Thibault Saunier <tsaunier@igalia.com> 2 3 [GStreamer]: Consider GstStream(Collection) as if if was not a GInitiallyUnowned 4 https://bugs.webkit.org/show_bug.cgi?id=185657 5 6 Reviewed by Philippe Normand. 7 8 Starting with GStreamer 1.14[1] the reference is sunk at object creation time, making it a normal 9 GObject in practice, in our GRefPtr template implementation we should just consider GstStream 10 as if it was a normal GObject and not care about its floating reference state as 11 the ref is never sunk by anyone before 1.14 though that floating ref is considered 12 as a hard reference by the GstStreamCollection (leading to assertions/) 13 14 The exact same issue happens with GstStreamCollection, so fix it at the same time. 15 16 Also do not adoptRef() on the result of gst_stream_collection_get_stream() as this function 17 is transfer-none. 18 19 [1] commit f119e93b47efb06ffc68c01d3e094d5346c30041 `gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent` 20 21 * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: 22 (WTF::adoptGRef): 23 (WTF::refGPtr<GstStream>): 24 (WTF::refGPtr<GstStreamCollection>): 25 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 26 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): 27 1 28 2018-05-16 Devin Rousso <webkit@devinrousso.com> 2 29 -
trunk/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp
r230540 r231891 357 357 template <> GRefPtr<GstStream> adoptGRef(GstStream* ptr) 358 358 { 359 ASSERT(!ptr || !g_object_is_floating(ptr));360 359 return GRefPtr<GstStream>(ptr, GRefPtrAdopt); 361 360 } … … 364 363 { 365 364 if (ptr) 366 gst_object_ref _sink(GST_OBJECT_CAST(ptr));365 gst_object_ref(GST_OBJECT_CAST(ptr)); 367 366 368 367 return ptr; … … 377 376 template <> GRefPtr<GstStreamCollection> adoptGRef(GstStreamCollection* ptr) 378 377 { 379 ASSERT(!ptr || !g_object_is_floating(ptr));380 378 return GRefPtr<GstStreamCollection>(ptr, GRefPtrAdopt); 381 379 } … … 384 382 { 385 383 if (ptr) 386 gst_object_ref _sink(GST_OBJECT_CAST(ptr));384 gst_object_ref(GST_OBJECT_CAST(ptr)); 387 385 388 386 return ptr; -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r231600 r231891 1324 1324 unsigned length = gst_message_streams_selected_get_size(message); 1325 1325 for (unsigned i = 0; i < length; i++) { 1326 GRefPtr<GstStream> stream = adoptGRef(gst_message_streams_selected_get_stream(message, i));1326 GRefPtr<GstStream> stream = gst_message_streams_selected_get_stream(message, i); 1327 1327 if (!stream) 1328 1328 continue; 1329 1329 1330 GstStreamType type = gst_stream_get_stream_type(stream.get()); 1330 1331 String streamId(gst_stream_get_stream_id(stream.get()));
Note: See TracChangeset
for help on using the changeset viewer.