Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2563563003: Fix error in VideoFileRenderer_nativeI420Scale. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2086 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 jint width, jint height, 2097 jint width, jint height,
2098 jbyteArray j_dst_buffer, jint dstWidth, jint dstHeight) { 2098 jbyteArray j_dst_buffer, jint dstWidth, jint dstHeight) {
2099 size_t src_size_y = jni->GetDirectBufferCapacity(j_src_buffer_y); 2099 size_t src_size_y = jni->GetDirectBufferCapacity(j_src_buffer_y);
2100 size_t src_size_u = jni->GetDirectBufferCapacity(j_src_buffer_u); 2100 size_t src_size_u = jni->GetDirectBufferCapacity(j_src_buffer_u);
2101 size_t src_size_v = jni->GetDirectBufferCapacity(j_src_buffer_v); 2101 size_t src_size_v = jni->GetDirectBufferCapacity(j_src_buffer_v);
2102 size_t dst_size = jni->GetDirectBufferCapacity(j_dst_buffer); 2102 size_t dst_size = jni->GetDirectBufferCapacity(j_dst_buffer);
2103 int dst_stride = dstWidth; 2103 int dst_stride = dstWidth;
2104 RTC_CHECK_GE(src_size_y, j_src_stride_y * height); 2104 RTC_CHECK_GE(src_size_y, j_src_stride_y * height);
2105 RTC_CHECK_GE(src_size_u, j_src_stride_u * height / 4); 2105 RTC_CHECK_GE(src_size_u, j_src_stride_u * height / 4);
2106 RTC_CHECK_GE(src_size_v, j_src_stride_v * height / 4); 2106 RTC_CHECK_GE(src_size_v, j_src_stride_v * height / 4);
2107 RTC_CHECK_GE(dst_size, dst_stride * height * 3 / 2); 2107 RTC_CHECK_GE(dst_size, dst_stride * dstHeight * 3 / 2);
2108 uint8_t* src_y = 2108 uint8_t* src_y =
2109 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_y)); 2109 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_y));
2110 uint8_t* src_u = 2110 uint8_t* src_u =
2111 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_u)); 2111 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_u));
2112 uint8_t* src_v = 2112 uint8_t* src_v =
2113 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_v)); 2113 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_src_buffer_v));
2114 uint8_t* dst = 2114 uint8_t* dst =
2115 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_dst_buffer)); 2115 reinterpret_cast<uint8_t*>(jni->GetDirectBufferAddress(j_dst_buffer));
2116 2116
2117 uint8_t* dst_y = dst; 2117 uint8_t* dst_y = dst;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2467 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer) 2467 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)
2468 ->SetObserver(nullptr); 2468 ->SetObserver(nullptr);
2469 RtpReceiverObserver* observer = 2469 RtpReceiverObserver* observer =
2470 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer); 2470 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer);
2471 if (observer) { 2471 if (observer) {
2472 delete observer; 2472 delete observer;
2473 } 2473 }
2474 } 2474 }
2475 2475
2476 } // namespace webrtc_jni 2476 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698