From 2426d11f795a99de85999b3ff0a26cc070a99a59 Mon Sep 17 00:00:00 2001 From: Ashok Bhat Date: Mon, 16 Jun 2014 17:42:02 +0100 Subject: m4v_h263_enc: Use uint32_t for ULong ULong is used in the encoder code as 32-bit unsigned integer type. But it has been defined as an unsigned long, which will be 64-bit on 64-bit platforms. This causes many problems including output mismatch between 32-bit and 64-bit code and crash in certain cases. This patch defines ULong as uint32_t. In addition, it uses uintptr_t at places where an address is cast to an integer to check for alignment. Change-Id: I2b0086824a5985b9fc4628ce6fbe81db156e37d2 Signed-off-by: Ashok Bhat --- media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp') diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp index da5b785..bf77f4a 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp +++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.cpp @@ -721,7 +721,7 @@ void SoftMPEG4Encoder::onQueueFilled(OMX_U32 /* portIndex */) { vin.uChan = vin.yChan + vin.height * vin.pitch; vin.vChan = vin.uChan + ((vin.height * vin.pitch) >> 2); - unsigned long modTimeMs = 0; + ULong modTimeMs = 0; int32_t nLayer = 0; MP4HintTrack hintTrack; if (!PVEncodeVideoFrame(mHandle, &vin, &vout, -- cgit v1.1