summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmpcodecs/vd_ffmpeg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index da1384cbe6..df85ab11a3 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -537,9 +537,11 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
} else
avctx->draw_horiz_band= NULL;
+#if LIBAVCODEC_BUILD >= 4689
// Palette support: libavcodec copies palette to *data[1]
if (mpi->bpp == 8)
mpi->planes[1] = malloc(AVPALETTE_SIZE);
+#endif
pic->data[0]= mpi->planes[0];
pic->data[1]= mpi->planes[1];