Commit 00bbca2f authored by Wim Taymans's avatar Wim Taymans
Browse files

videoconvert: free tmplines correctly

Keep track of how many tmplines we allocated and use that to free the
correct amount of lines.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701234
parent d32d2f0b
......@@ -90,7 +90,7 @@ videoconvert_convert_free (VideoConvert * convert)
{
gint i;
for (i = 0; i < convert->lines; i++)
for (i = 0; i < convert->n_tmplines; i++)
g_free (convert->tmplines[i]);
g_free (convert->tmplines);
g_free (convert->errline);
......@@ -418,6 +418,7 @@ videoconvert_convert_compute_resample (VideoConvert * convert)
lines = MAX (convert->down_n_lines, convert->up_n_lines);
convert->n_tmplines = lines;
convert->tmplines = g_malloc (lines * sizeof (gpointer));
for (i = 0; i < lines; i++)
convert->tmplines[i] = g_malloc (sizeof (guint16) * (width + 8) * 4);
......
......@@ -48,6 +48,7 @@ struct _VideoConvert {
guint lines;
guint n_tmplines;
gpointer *tmplines;
guint16 *errline;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment