Previously, if this field wasn't set, the invalid coding mode
could lead to crashes later.
Bug: 22860270
Change-Id: If8dd2f8d5f2fbdd6bb76772344f959df23159167
Changed macro specifying the minimum size required for output buffer.
Added an error check on the size allocated for output buffer.
Change-Id: I98e4f46e62ffc974df760f2633689de079ca3e5e