diff options
Diffstat (limited to 'libmpcodecs/vf.c')
-rw-r--r-- | libmpcodecs/vf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c index 5e7d1b4768..3c1c5e9538 100644 --- a/libmpcodecs/vf.c +++ b/libmpcodecs/vf.c @@ -329,8 +329,8 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, // keep buffer allocation status & color flags only: // mpi->flags&=~(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_DIRECT); mpi->flags&=MP_IMGFLAG_ALLOCATED|MP_IMGFLAG_TYPE_DISPLAYED|MP_IMGFLAGMASK_COLORS; - // accept restrictions & draw_slice flags only: - mpi->flags|=mp_imgflag&(MP_IMGFLAGMASK_RESTRICTIONS|MP_IMGFLAG_DRAW_CALLBACK); + // accept restrictions, draw_slice and palette flags only: + mpi->flags|=mp_imgflag&(MP_IMGFLAGMASK_RESTRICTIONS|MP_IMGFLAG_DRAW_CALLBACK|MP_IMGFLAG_RGB_PALETTE); if(!vf->draw_slice) mpi->flags&=~MP_IMGFLAG_DRAW_CALLBACK; if(mpi->width!=w2 || mpi->height!=h){ // printf("vf.c: MPI parameters changed! %dx%d -> %dx%d \n", mpi->width,mpi->height,w2,h); @@ -413,6 +413,8 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, } else { //if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; + if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) + mpi->planes[1] = memalign(64, 1024); } // printf("clearing img!\n"); vf_mpi_clear(mpi,0,0,mpi->width,mpi->height); |