Crash with HTML 5 video with gstreamer enabled (bmo#761030)
authorWolfgang Rosenauer <wr@rosenauer.org>
Mon, 11 Jun 2012 00:15:02 +0200
changeset 470 983544dc8af4
parent 469 26e68edfc24b
child 471 73b631ab214b
Crash with HTML 5 video with gstreamer enabled (bmo#761030)
MozillaFirefox/mozilla-gstreamer.patch
mozilla-gstreamer.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MozillaFirefox/mozilla-gstreamer.patch	Mon Jun 11 00:15:02 2012 +0200
@@ -0,0 +1,1 @@
+../mozilla-gstreamer.patch
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-gstreamer.patch	Mon Jun 11 00:15:02 2012 +0200
@@ -0,0 +1,27 @@
+# HG changeset patch
+# Parent 305397d1d86aaf3d3da2e9357eea2fdd1888a325
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+Bug 761030 - Crash with HTML 5 video with gstreamer enabled (TM: 16)
+
+diff --git a/content/media/gstreamer/nsGStreamerReader.cpp b/content/media/gstreamer/nsGStreamerReader.cpp
+--- a/content/media/gstreamer/nsGStreamerReader.cpp
++++ b/content/media/gstreamer/nsGStreamerReader.cpp
+@@ -447,16 +447,18 @@ bool nsGStreamerReader::DecodeVideoFrame
+   for(int i = 0; i < 3; i++) {
+     b.mPlanes[i].mData = data + gst_video_format_get_component_offset(format, i,
+         width, height);
+     b.mPlanes[i].mStride = gst_video_format_get_row_stride(format, i, width);
+     b.mPlanes[i].mHeight = gst_video_format_get_component_height(format,
+         i, height);
+     b.mPlanes[i].mWidth = gst_video_format_get_component_width(format,
+         i, width);
++    b.mPlanes[i].mOffset = 0;
++    b.mPlanes[i].mSkip = 0;
+   }
+ 
+   bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer,
+       GST_BUFFER_FLAG_DELTA_UNIT);
+   /* XXX ? */
+   PRInt64 offset = 0;
+   VideoData *video = VideoData::Create(mInfo,
+                                        mDecoder->GetImageContainer(),