Ticket #410: ffmpeg-0.4.9_p20050906-pal8.patch

File ffmpeg-0.4.9_p20050906-pal8.patch, 707 bytes (added by s.kilvington@…, 21 years ago)

patch to fix it

  • libavcodec/utils.c

    old new  
    325325            const int h_shift= i==0 ? 0 : h_chroma_shift;
    326326            const int v_shift= i==0 ? 0 : v_chroma_shift;
    327327
     328            if(s->pix_fmt == PIX_FMT_PAL8 && i == 1)
     329            {
     330                buf->base[i] = av_malloc(256 * 4);
     331                if(buf->base[i] == NULL)
     332                    return -1;
     333                buf->data[i] = buf->base[i];
     334                continue;
     335            }
     336
    328337            //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it
    329338            buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, STRIDE_ALIGN<<(h_chroma_shift-h_shift));
    330339