DO NOT MERGE - ACodec: Save and use the previous crop rectangle.

When the surface changes, set the crop rectangle for the new native
window using the previous crop rectangle if available.

Also prevent null pointer dereferencing in debug mode.

Bug: 30690174

Change-Id: I7a707d661ced5a87fcaa8568cbb903fbc26ea346
2 files changed