Bug 990780 - Add more padding to MediaCodec::ReadOptions for HTC devices r=doublec
authorEdwin Flores <eflores@mozilla.com>
Wed, 23 Apr 2014 13:00:10 +1200
changeset 180068 0f8076e2165992a141bb0f3c01d9f0147a2a7ee4
parent 180067 4fca4b6565d87b19402f2cece5aa7e8d380c9299
child 180069 7756408df0dd2c446ab5c900857ef427a8369977
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersdoublec
bugs990780, 932820
milestone31.0a1
Bug 990780 - Add more padding to MediaCodec::ReadOptions for HTC devices r=doublec The HTC version of OMXCodec has extra fields in its ReadOptions class over the AOSP version. We added padding in bug 932820, but it was apparently not enough. This patch simply adds more padding to our version of the class.
media/omx-plugin/OmxPlugin.cpp
--- a/media/omx-plugin/OmxPlugin.cpp
+++ b/media/omx-plugin/OmxPlugin.cpp
@@ -933,17 +933,17 @@ bool OmxDecoder::ToAudioFrame(AudioFrame
   aFrame->Set(aTimeUs, reinterpret_cast<char *>(aData) + aDataOffset, aSize, aAudioChannels, aAudioSampleRate);
   return true;
 }
 
 class ReadOptions : public MediaSource::ReadOptions
 {
   // HTC have their own version of ReadOptions with extra fields. If we don't
   // have this here, HTCOMXCodec will corrupt our stack.
-  uint32_t sadface[4];
+  uint32_t sadface[16];
 };
 
 bool OmxDecoder::ReadVideo(VideoFrame *aFrame, int64_t aSeekTimeUs,
                            BufferCallback *aBufferCallback)
 {
   MOZ_ASSERT(aSeekTimeUs >= -1);
 
   if (!mVideoSource.get())