summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/SurfaceMediaSource.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/media/libstagefright/SurfaceMediaSource.cpp b/media/libstagefright/SurfaceMediaSource.cpp
index c2e6707..91b81c2 100644
--- a/media/libstagefright/SurfaceMediaSource.cpp
+++ b/media/libstagefright/SurfaceMediaSource.cpp
@@ -179,9 +179,11 @@ status_t SurfaceMediaSource::dequeueBuffer(int *outBuf, uint32_t w, uint32_t h,
// TODO: Currently just uses mDefaultWidth/Height. In the future
// we might declare mHeight and mWidth and check against those here.
if ((w != 0) || (h != 0)) {
- LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
- mDefaultWidth, mDefaultHeight, w, h);
- return BAD_VALUE;
+ if ((w != mDefaultWidth) || (h != mDefaultHeight)) {
+ LOGE("dequeuebuffer: invalid buffer size! Req: %dx%d, Found: %dx%d",
+ mDefaultWidth, mDefaultHeight, w, h);
+ return BAD_VALUE;
+ }
}
status_t returnFlags(OK);