equal
deleted
inserted
replaced
1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent a9a49c20c491011f981b6c110aadfa6a01a1431e |
2 # Parent e4b87e710b1a5f0bb7db058911bc163b4bf30227 |
3 # User Wolfgang Rosenauer <wr@rosenauer.org> |
3 # User Wolfgang Rosenauer <wr@rosenauer.org> |
4 Bug 761030 - Crash with HTML 5 video with gstreamer enabled (TM: 16) |
|
5 |
|
6 No Bug - use GStreamer _only_ for MP4 (not WebM/OGG) |
4 No Bug - use GStreamer _only_ for MP4 (not WebM/OGG) |
7 |
5 |
8 diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp |
6 diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp |
9 --- a/content/html/content/src/nsHTMLMediaElement.cpp |
7 --- a/content/html/content/src/nsHTMLMediaElement.cpp |
10 +++ b/content/html/content/src/nsHTMLMediaElement.cpp |
8 +++ b/content/html/content/src/nsHTMLMediaElement.cpp |
11 @@ -2278,21 +2278,17 @@ nsHTMLMediaElement::CreateDecoder(const |
9 @@ -2277,21 +2277,17 @@ nsHTMLMediaElement::CreateDecoder(const |
12 nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder(); |
10 nsRefPtr<nsRawDecoder> decoder = new nsRawDecoder(); |
13 if (decoder->Init(this)) { |
11 if (decoder->Init(this)) { |
14 return decoder.forget(); |
12 return decoder.forget(); |
15 } |
13 } |
16 } |
14 } |
28 } |
26 } |
29 #endif |
27 #endif |
30 #ifdef MOZ_WAVE |
28 #ifdef MOZ_WAVE |
31 if (IsWaveType(aType)) { |
29 if (IsWaveType(aType)) { |
32 nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder(); |
30 nsRefPtr<nsWaveDecoder> decoder = new nsWaveDecoder(); |
33 @@ -2306,21 +2302,17 @@ nsHTMLMediaElement::CreateDecoder(const |
31 @@ -2305,21 +2301,17 @@ nsHTMLMediaElement::CreateDecoder(const |
34 nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType); |
32 nsRefPtr<nsMediaPluginDecoder> decoder = new nsMediaPluginDecoder(aType); |
35 if (decoder->Init(this)) { |
33 if (decoder->Init(this)) { |
36 return decoder.forget(); |
34 return decoder.forget(); |
37 } |
35 } |
38 } |
36 } |
50 } |
48 } |
51 #endif |
49 #endif |
52 |
50 |
53 #ifdef MOZ_GSTREAMER |
51 #ifdef MOZ_GSTREAMER |
54 if (IsH264Type(aType)) { |
52 if (IsH264Type(aType)) { |
55 diff --git a/content/media/gstreamer/nsGStreamerReader.cpp b/content/media/gstreamer/nsGStreamerReader.cpp |
|
56 --- a/content/media/gstreamer/nsGStreamerReader.cpp |
|
57 +++ b/content/media/gstreamer/nsGStreamerReader.cpp |
|
58 @@ -447,16 +447,18 @@ bool nsGStreamerReader::DecodeVideoFrame |
|
59 for(int i = 0; i < 3; i++) { |
|
60 b.mPlanes[i].mData = data + gst_video_format_get_component_offset(format, i, |
|
61 width, height); |
|
62 b.mPlanes[i].mStride = gst_video_format_get_row_stride(format, i, width); |
|
63 b.mPlanes[i].mHeight = gst_video_format_get_component_height(format, |
|
64 i, height); |
|
65 b.mPlanes[i].mWidth = gst_video_format_get_component_width(format, |
|
66 i, width); |
|
67 + b.mPlanes[i].mOffset = 0; |
|
68 + b.mPlanes[i].mSkip = 0; |
|
69 } |
|
70 |
|
71 bool isKeyframe = !GST_BUFFER_FLAG_IS_SET(buffer, |
|
72 GST_BUFFER_FLAG_DELTA_UNIT); |
|
73 /* XXX ? */ |
|
74 PRInt64 offset = 0; |
|
75 VideoData *video = VideoData::Create(mInfo, |
|
76 mDecoder->GetImageContainer(), |
|