Created
May 1, 2012 22:06
-
-
Save gstark/2571816 to your computer and use it in GitHub Desktop.
gstvideoscale_patch.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c | |
index 7b44647..5618b37 100644 | |
--- a/gst/videoscale/gstvideoscale.c | |
+++ b/gst/videoscale/gstvideoscale.c | |
@@ -307,6 +307,7 @@ gst_video_scale_class_init (GstVideoScaleClass * klass) | |
static void | |
gst_video_scale_init (GstVideoScale * videoscale, GstVideoScaleClass * klass) | |
{ | |
+ GST_DEBUG("GES: calling video scale init"); | |
videoscale->tmp_buf = NULL; | |
videoscale->method = DEFAULT_PROP_METHOD; | |
videoscale->add_borders = DEFAULT_PROP_ADD_BORDERS; | |
@@ -320,8 +321,12 @@ gst_video_scale_init (GstVideoScale * videoscale, GstVideoScaleClass * klass) | |
static void | |
gst_video_scale_finalize (GstVideoScale * videoscale) | |
{ | |
+ GST_DEBUG("GES: calling video scale finalize"); | |
if (videoscale->tmp_buf) | |
+ { | |
+ GST_DEBUG("GES: calling video scale free"); | |
g_free (videoscale->tmp_buf); | |
+ } | |
G_OBJECT_CLASS (parent_class)->finalize (G_OBJECT (videoscale)); | |
} | |
@@ -521,7 +526,11 @@ gst_video_scale_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out) | |
} | |
if (videoscale->tmp_buf) | |
+ { | |
+ GST_DEBUG("GES: calling video scale free before malloc"); | |
g_free (videoscale->tmp_buf); | |
+ } | |
+ GST_DEBUG("GES: calling video scale malloc"); | |
videoscale->tmp_buf = g_malloc (videoscale->to_width * 8 * 4); | |
gst_base_transform_set_passthrough (trans, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apply this patch against 0.10.36. When I run this with GST_DEBUG=*:5 and you'll see that there is something leading to memory leaks. I don't think its in videoscale but it was the clearest spot I could find to place some debugging to trace. (it also showed as the largest leak in valgrind)
gst-launch playbin2 uri=......
However.
gst-launch playbin uri=......