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 198173 0f8076e2165992a141bb0f3c01d9f0147a2a7ee4
parent 198172 4fca4b6565d87b19402f2cece5aa7e8d380c9299
child 198174 7756408df0dd2c446ab5c900857ef427a8369977
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs990780, 932820
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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())