diff options
| author | Pannag Sanketi <psanketi@google.com> | 2011-08-24 17:39:09 -0700 | 
|---|---|---|
| committer | Pannag Sanketi <psanketi@google.com> | 2011-08-24 17:51:05 -0700 | 
| commit | f76e1672c674620cb056f338a25ee4826d55dfcb (patch) | |
| tree | d09da6ba0e48617adc7a7ccd12f6dd9f3c26492b /media | |
| parent | ed422aa0dfab77312d25d52e7f204744ba16dc27 (diff) | |
| download | frameworks_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')
| -rw-r--r-- | media/libstagefright/SurfaceMediaSource.cpp | 8 | 
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);  | 
