--- libavcodec/utils.c.orig	2005-11-17 15:13:57.000000000 +0000
+++ libavcodec/utils.c	2005-11-17 15:14:51.000000000 +0000
@@ -325,6 +325,15 @@
             const int h_shift= i==0 ? 0 : h_chroma_shift;
             const int v_shift= i==0 ? 0 : v_chroma_shift;
 
+	    if(s->pix_fmt == PIX_FMT_PAL8 && i == 1)
+	    {
+	        buf->base[i] = av_malloc(256 * 4);
+	        if(buf->base[i] == NULL)
+	            return -1;
+	        buf->data[i] = buf->base[i];
+	        continue;
+	    }
+
             //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it
             buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, STRIDE_ALIGN<<(h_chroma_shift-h_shift)); 
 
