Changeset 263031 in webkit
- Timestamp:
- Jun 15, 2020, 3:33:58 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r263026 r263031 1 2020-06-15 Philippe Normand <pnormand@igalia.com> 2 3 [GStreamer] ImageDecoder hits Debug ASSERTs 4 https://bugs.webkit.org/show_bug.cgi?id=213178 5 6 Reviewed by Xabier Rodriguez-Calvar. 7 8 Pass a reference of the decoder to its inner implementation instead of a WeakPtr, which 9 can't be used across multiple threads. 10 11 Covered by fast/images/animated-image-mp4{,-crash}.html tests. 12 13 * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: 14 (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad): 15 * platform/graphics/gstreamer/ImageDecoderGStreamer.h: 16 1 17 2020-06-15 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
r262695 r263031 239 239 { nullptr } 240 240 }; 241 gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, m_decoder.get(), nullptr);241 gst_app_sink_set_callbacks(GST_APP_SINK(sink), &callbacks, &m_decoder, nullptr); 242 242 243 243 GRefPtr<GstCaps> caps = adoptGRef(gst_caps_from_string("video/x-raw, format=(string)RGBA")); -
trunk/Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.h
r262695 r263031 36 36 class ImageDecoderGStreamerSample; 37 37 38 class ImageDecoderGStreamer final : public ImageDecoder , public CanMakeWeakPtr<ImageDecoderGStreamer>{38 class ImageDecoderGStreamer final : public ImageDecoder { 39 39 WTF_MAKE_FAST_ALLOCATED; 40 40 WTF_MAKE_NONCOPYABLE(ImageDecoderGStreamer); … … 86 86 87 87 InnerDecoder(ImageDecoderGStreamer& decoder, const char* data, gssize size) 88 : m_decoder( makeWeakPtr(decoder))88 : m_decoder(decoder) 89 89 , m_runLoop(RunLoop::current()) 90 90 { … … 101 101 void connectDecoderPad(GstPad*); 102 102 103 WeakPtr<ImageDecoderGStreamer>m_decoder;103 ImageDecoderGStreamer& m_decoder; 104 104 GRefPtr<GstElement> m_pipeline; 105 105 GRefPtr<GInputStream> m_memoryStream;
Note:
See TracChangeset
for help on using the changeset viewer.