jpegenc: Keep variables in sane state after _reset
authorThiago Santos <thiago.sousa.santos@collabora.co.uk>
Fri, 28 May 2010 13:43:36 +0000 (10:43 -0300)
committerThiago Santos <thiago.sousa.santos@collabora.co.uk>
Fri, 28 May 2010 13:43:36 +0000 (10:43 -0300)
When reseting, keep 'row' variables at a sane state after
freeing to avoid it being freed again on _resync realloc
when the element is reused.

Fixes #619943

ext/jpeg/gstjpegenc.c

index da2c4da..230b11c 100644 (file)
@@ -308,6 +308,7 @@ gst_jpegenc_reset (GstJpegEnc * enc)
   for (i = 0; i < 3; i++) {
     for (j = 0; j < 4 * DCTSIZE; j++) {
       g_free (enc->row[i][j]);
+      enc->row[i][j] = NULL;
     }
   }