Revert "Fixed the incorrect stride and slice height settings of OMX video port."a am: 44c7c2d
am: 058936a
* commit '058936abe360c150890bb735e7f9b8e07e316620':
Revert "Fixed the incorrect stride and slice height settings of OMX video port."a
Change-Id: I63c6d0acd5bd4ccc76a1aa8e33907a9a77f65efb
diff --git a/base/src/portbase.cpp b/base/src/portbase.cpp
index 2f1ec92..a707876 100644
--- a/base/src/portbase.cpp
+++ b/base/src/portbase.cpp
@@ -264,9 +264,13 @@
OMX_S32 nFrameSize = getFrameBufSize(format->eColorFormat,format->nFrameWidth,format->nFrameHeight);
if(nFrameSize!=-1)
temp.nBufferSize = nFrameSize;
-
- format->nStride = pformat->nStride;
- format->nSliceHeight = pformat->nSliceHeight;
+ if (overwrite_readonly) {
+ format->nStride = pformat->nStride;
+ format->nSliceHeight = pformat->nSliceHeight;
+ } else {
+ format->nStride = pformat->nFrameWidth;
+ format->nSliceHeight = pformat->nFrameHeight;
+ }
break;
}