vp9_cx_iface,encoder_encode: only calc ts when img!=NULL
avoid calculating the end timestamp when performing a flush to prevent
an implicit conversion warning when applying a non-zero offset to a 0
pts used in that case:
vp9/vp9_cx_iface.c:1361:50: runtime error: implicit conversion from type
'vpx_codec_pts_t' (aka 'long') of value -15 (64-bit, signed) to type
'unsigned long' changed the value to
18446744073709551601 (64-bit,
unsigned)
Bug: b/
229626362
Change-Id: I68ba19b7d6de35cc185707dfb6b43406b7165035