diff --git a/pipi/pipi.c b/pipi/pipi.c
index 21b7f84..738dac0 100644
--- a/pipi/pipi.c
+++ b/pipi/pipi.c
@@ -48,6 +48,7 @@ pipi_image_t *pipi_new(int w, int h)
     img->w = w;
     img->h = h;
     img->last_modified = PIPI_PIXELS_UNINITIALISED;
+    img->codec_format = PIPI_PIXELS_UNINITIALISED;
 
     return img;
 }