summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorPannag Sanketi <psanketi@google.com>2011-08-24 17:39:09 -0700
committerPannag Sanketi <psanketi@google.com>2011-08-24 17:51:05 -0700
commitf76e1672c674620cb056f338a25ee4826d55dfcb (patch)
treed09da6ba0e48617adc7a7ccd12f6dd9f3c26492b /media/libstagefright
parented422aa0dfab77312d25d52e7f204744ba16dc27 (diff)
downloadframeworks_av-f76e1672c674620cb056f338a25ee4826d55dfcb.zip
frameworks_av-f76e1672c674620cb056f338a25ee4826d55dfcb.tar.gz
frameworks_av-f76e1672c674620cb056f338a25ee4826d55dfcb.tar.bz2
Default W, H allowed in SurfaceMediaSource dequeue
The client does not have to send (w, h) = (0,0) in dequeuebuffer. It can set the same w, h as the default width and height. Change-Id: I8202f90261ccaebbd35ea28c153a7472f01912f1
Diffstat (limited to 'media/libstagefright')
-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 ddfd9ff..f219fa5 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;
+ }
}
Mutex::Autolock lock(mMutex);