diff --git a/gst-libs/gst/video/video-blend.c b/gst-libs/gst/video/video-blend.c index 78ef7eb6fa..140e2bbb79 100644 --- a/gst-libs/gst/video/video-blend.c +++ b/gst-libs/gst/video/video-blend.c @@ -1259,6 +1259,7 @@ G_STMT_START { \ ret = v0 + (v1 * (255 - alpha)) / 255; \ } G_STMT_END +/* returns newly-allocated pixels in src->pixels, which caller must g_free() */ void video_blend_scale_linear_RGBA (GstBlendVideoFormatInfo * src, gint dest_height, gint dest_width) diff --git a/tests/check/libs/video.c b/tests/check/libs/video.c index 91a5e4b113..4abd0b37ab 100644 --- a/tests/check/libs/video.c +++ b/tests/check/libs/video.c @@ -25,6 +25,10 @@ #include "config.h" #endif +#ifdef HAVE_VALGRIND +# include +#endif + #include #include @@ -905,8 +909,13 @@ GST_START_TEST (test_overlay_composition) fail_unless (gst_video_buffer_get_overlay_composition (buf) == NULL); gst_buffer_ref (buf); - /* buffer now has refcount of 2, so its metadata is not writable */ - ASSERT_CRITICAL (gst_video_buffer_set_overlay_composition (buf, comp1)); + /* buffer now has refcount of 2, so its metadata is not writable. + * only check this if we are not running in valgrind, as it leaks */ +#ifdef HAVE_VALGRIND + if (!RUNNING_ON_VALGRIND) { + ASSERT_CRITICAL (gst_video_buffer_set_overlay_composition (buf, comp1)); + } +#endif gst_buffer_unref (buf); gst_video_buffer_set_overlay_composition (buf, comp1); fail_unless (gst_video_buffer_get_overlay_composition (buf) == comp1);