Changeset 247298 in webkit
- Timestamp:
- Jul 10, 2019 7:53:51 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247295 r247298 1 2019-07-10 Enrique Ocaña González <eocanha@igalia.com> 2 3 [GStreamer] Protect against null samples and samples with null buffers 4 https://bugs.webkit.org/show_bug.cgi?id=199619 5 6 Reviewed by Philippe Normand. 7 8 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: 9 (WebCore::GstVideoFrameHolder::GstVideoFrameHolder): Assert to enforce non-null samples. 10 (WebCore::GstVideoFrameHolder::updateTexture): Protect against null m_buffer and improperly mapped video frame. 11 1 12 2019-07-09 Andres Gonzalez <andresg_22@apple.com> 2 13 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp
r246730 r247298 138 138 explicit GstVideoFrameHolder(GstSample* sample, TextureMapperGL::Flags flags, bool gstGLEnabled) 139 139 { 140 RELEASE_ASSERT(GST_IS_SAMPLE(sample)); 141 140 142 GstVideoInfo videoInfo; 141 143 if (UNLIKELY(!getSampleVideoInfo(sample, videoInfo))) … … 188 190 ASSERT(!m_textureID); 189 191 GstVideoGLTextureUploadMeta* meta; 190 if ( (meta = gst_buffer_get_video_gl_texture_upload_meta(m_buffer))) {192 if (m_buffer && (meta = gst_buffer_get_video_gl_texture_upload_meta(m_buffer))) { 191 193 if (meta->n_textures == 1) { // BRGx & BGRA formats use only one texture. 192 194 guint ids[4] = { texture.id(), 0, 0, 0 }; … … 197 199 } 198 200 201 if (!m_isMapped) 202 return; 203 199 204 int stride = GST_VIDEO_FRAME_PLANE_STRIDE(&m_videoFrame, 0); 200 205 const void* srcData = GST_VIDEO_FRAME_PLANE_DATA(&m_videoFrame, 0); 206 207 if (!srcData) 208 return; 209 201 210 texture.updateContents(srcData, WebCore::IntRect(0, 0, m_size.width(), m_size.height()), WebCore::IntPoint(0, 0), stride); 202 211 }
Note: See TracChangeset
for help on using the changeset viewer.