#include "mp4dec_api.h"
#include <OMX_Component.h>
+#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaBufferGroup.h>
-#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/MetaData.h>
int32_t vol_size = 0;
if (meta->findData(kKeyESDS, &type, &data, &size)) {
ESDS esds((const uint8_t *)data, size);
- CHECK_EQ(esds.InitCheck(), OK);
+ CHECK_EQ(esds.InitCheck(), (status_t)OK);
const void *codec_specific_data;
size_t codec_specific_data_size;
}
MP4DecodingMode actualMode = PVGetDecBitstreamMode(mHandle);
- CHECK_EQ(mode, actualMode);
+ CHECK_EQ((int)mode, (int)actualMode);
PVSetPostProcType((VideoDecControls *) mHandle, 0);
ReadOptions::SeekMode mode;
if (options && options->getSeekTo(&seekTimeUs, &mode)) {
seeking = true;
- CHECK_EQ(PVResetVideoDecoder(mHandle), PV_TRUE);
+ CHECK_EQ((int)PVResetVideoDecoder(mHandle), PV_TRUE);
}
MediaBuffer *inputBuffer = NULL;
return UNKNOWN_ERROR;
}
- int32_t width, height;
- PVGetVideoDimensions(mHandle, &width, &height);
- if (width != mWidth || height != mHeight) {
+ int32_t disp_width, disp_height;
+ PVGetVideoDimensions(mHandle, &disp_width, &disp_height);
+
+ int32_t buf_width, buf_height;
+ PVGetBufferDimensions(mHandle, &buf_width, &buf_height);
+
+ if (buf_width != mWidth || buf_height != mHeight) {
++mNumSamplesOutput; // The client will never get to see this frame.
inputBuffer->release();
inputBuffer = NULL;
- mWidth = width;
- mHeight = height;
+ mWidth = buf_width;
+ mHeight = buf_height;
mFormat->setInt32(kKeyWidth, mWidth);
mFormat->setInt32(kKeyHeight, mHeight);
+ CHECK_LE(disp_width, buf_width);
+ CHECK_LE(disp_height, buf_height);
+
return INFO_FORMAT_CHANGED;
}
Bool PVDecodeVopBody(VideoDecControls *decCtrl, int32 buffer_size[]);
void PVDecPostProcess(VideoDecControls *decCtrl, uint8 *outputYUV);
OSCL_IMPORT_REF void PVGetVideoDimensions(VideoDecControls *decCtrl, int32 *display_width, int32 *display_height);
+ OSCL_IMPORT_REF void PVGetBufferDimensions(VideoDecControls *decCtrl, int32 *buf_width, int32 *buf_height);
OSCL_IMPORT_REF void PVSetPostProcType(VideoDecControls *decCtrl, int mode);
uint32 PVGetVideoTimeStamp(VideoDecControls *decoderControl);
int PVGetDecBitrate(VideoDecControls *decCtrl);