mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 05:16:05 +00:00
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
This commit is contained in:
parent
d32d2f0b14
commit
00bbca2f9f
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue