Allow releaseCallback to be null in JavaI420Buffer#wrap.

R=magjed

Bug: None
Change-Id: I3d57198dd0b8e0575af61b0dac439e3753a2360a
Reviewed-on: https://webrtc-review.googlesource.com/92386
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24193}
This commit is contained in:
Sami Kalliomäki
2018-08-03 14:06:59 +02:00
committed by Commit Bot
parent 46671402ff
commit 15f0a12b83

View File

@ -50,7 +50,8 @@ public class JavaI420Buffer implements VideoFrame.I420Buffer {
/** Wraps existing ByteBuffers into JavaI420Buffer object without copying the contents. */
public static JavaI420Buffer wrap(int width, int height, ByteBuffer dataY, int strideY,
ByteBuffer dataU, int strideU, ByteBuffer dataV, int strideV, Runnable releaseCallback) {
ByteBuffer dataU, int strideU, ByteBuffer dataV, int strideV,
@Nullable Runnable releaseCallback) {
if (dataY == null || dataU == null || dataV == null) {
throw new IllegalArgumentException("Data buffers cannot be null.");
}