From f1ab254b47f2ad2301ef9e164ecd8f1f68cb9903 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Wed, 23 Feb 2011 19:01:59 +0100 Subject: [PATCH] Silence non-const vs. const warning with FFmpeg 0.6 --- src/artwork.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/artwork.c b/src/artwork.c index 66f92599..3024ea1a 100644 --- a/src/artwork.c +++ b/src/artwork.c @@ -301,7 +301,12 @@ artwork_rescale(AVFormatContext *src_ctx, int s, int out_w, int out_h, struct ev } /* Scale */ +#if (LIBSWSCALE_VERSION_MAJOR == 0 && LIBSWSCALE_VERSION_MINOR >= 9) + /* FFmpeg 0.6 */ + sws_scale(swsctx, (const uint8_t * const *)i_frame->data, i_frame->linesize, 0, src->height, o_frame->data, o_frame->linesize); +#else sws_scale(swsctx, i_frame->data, i_frame->linesize, 0, src->height, o_frame->data, o_frame->linesize); +#endif sws_freeContext(swsctx); av_free_packet(&pkt);