diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-30 00:53:08 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-12-30 00:56:10 +0200 |
commit | d46b86bc7c39082b26ec71aa16431f3275d836ff (patch) | |
tree | 035da87ed658f7d75c0eba5a5d4de5462a4c8ddd /libmpcodecs/mp_image.h | |
parent | a06b32b64e91082c11f747e2910f10a4afd3dfa9 (diff) | |
parent | 3e8f2815c19703f5cb6f75db2910234d499d9676 (diff) | |
download | mpv-d46b86bc7c39082b26ec71aa16431f3275d836ff.tar.bz2 mpv-d46b86bc7c39082b26ec71aa16431f3275d836ff.tar.xz |
Merge svn changes up to r30136
Ignore another broken correct-pts change in 30134.
Diffstat (limited to 'libmpcodecs/mp_image.h')
-rw-r--r-- | libmpcodecs/mp_image.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmpcodecs/mp_image.h b/libmpcodecs/mp_image.h index 77ce04102a..a62f403e27 100644 --- a/libmpcodecs/mp_image.h +++ b/libmpcodecs/mp_image.h @@ -38,7 +38,7 @@ #define MP_IMGFLAG_YUV 0x200 // set if it's swapped (BGR or YVU) plane/byteorder #define MP_IMGFLAG_SWAPPED 0x400 -// using palette for RGB data +// set if you want memory for palette allocated and managed by vf_get_image etc. #define MP_IMGFLAG_RGB_PALETTE 0x800 #define MP_IMGFLAGMASK_COLORS 0xF00 @@ -223,6 +223,8 @@ static inline void free_mp_image(mp_image_t* mpi){ if(mpi->flags&MP_IMGFLAG_ALLOCATED){ /* becouse we allocate the whole image in once */ if(mpi->planes[0]) free(mpi->planes[0]); + if (mpi->flags & MP_IMGFLAG_RGB_PALETTE) + free(mpi->planes[1]); } free(mpi); } |