OSDN Git Service
stagefright-plugins: Fix video of resolution 320x240
Video of resoltuion 320x240 cannot be played correctly.
Since the width and height of mCtx are not set and eqauls to zero.
The width and height of mCts are supposed to be set by
OMX_IndexParamPortDefinition, but the default size is
320x240. So in function internalSetParameter,
case OMX_IndexParamPortDefinition,
(newWidth != oldWidth || newHeight != oldHeight)
is always false and skipped setting mCts->width and height.
This results avcodec_open2 fails and an error is printed out
"Picture size 0x0 is invalid".
Setting mCtx->width and height to mWidth and mHeight solves
the problem.
Change-Id: I5dec4e4af66afded27dc4e6d2835249262f90528