Fix several test-resample BufferProvider bugs
Previously getNextBuffer always returned the same data address over and over. Now it correctly returns the right portion of the input buffer. Previously getNextBuffer always returned the total number of frames in the input, which might be larger than the size requested by the caller, and/or larger than the number of remaining input frames. It also always returned successfully, even when there should be no frames available. This violates the contract for getNextBuffer. Now getNextBuffer will return the maximum of the number of frames requested, and the number of remaining frames available. If that maximum is zero, getNextBuffer will return an error instead. Previously releaseBuffer would silently allow releasing more frames than were actually gotten, which violates the contract for releaseBuffer. Now releaseBuffer checks for this and logs a message if it happens. Add 'v' (verbose) option to log buffer provider calls. Bug: 12194314 Change-Id: I9b915e954b3612a07ef271da8652486b8875e0fd
Loading
Please register or sign in to comment