Instead of rejecting the samples later when they don't fit in the
buffer, reject the entire file early.
Bug: 22882938
Change-Id: I748153b0e9e827e3f2526468756295b4b5000de6
(cherry picked from commit beef7e58)
Ticket: CYNGNOS-985
(cherry picked from commit aea96e36)