From a9ff15b7bbd7b2a646f94328ff702091acde225a Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Wed, 11 Jun 2014 00:16:59 +0000 Subject: [PATCH] check copy has different address. If same, skip the copy to avoid valgrind error. BUG=334 TESTED=unittests still pass R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/14679004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1011 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/planar_functions.cc | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.chromium b/README.chromium index 68dad8b6e..1905093d7 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1010 +Version: 1011 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 827344925..e4534cadc 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1010 +#define LIBYUV_VERSION 1011 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT diff --git a/source/planar_functions.cc b/source/planar_functions.cc index f1297ca53..3857008ca 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -37,6 +37,10 @@ void CopyPlane(const uint8* src_y, int src_stride_y, height = 1; src_stride_y = dst_stride_y = 0; } + // Nothing to do. + if (src_y == dst_y && src_stride_y == dst_stride_y) { + return; + } #if defined(HAS_COPYROW_X86) if (TestCpuFlag(kCpuHasX86) && IS_ALIGNED(width, 4)) { CopyRow = CopyRow_X86;