]> git.sesse.net Git - mlt/commitdiff
fix avformat build on older versions (YUVA444P is new)
authorDan Dennedy <dan@dennedy.org>
Mon, 20 Feb 2012 21:30:24 +0000 (13:30 -0800)
committerDan Dennedy <dan@dennedy.org>
Mon, 20 Feb 2012 21:30:24 +0000 (13:30 -0800)
src/modules/avformat/producer_avformat.c

index f313db4fbf716ab652e3493d287be508aa083737..17978db258672fbc4e9ed672620ee5025c5ede93 100644 (file)
@@ -1258,7 +1258,11 @@ static void convert_image( AVFrame *frame, uint8_t *buffer, int pix_fmt,
 #endif
 
        // extract alpha from planar formats
-       if ( ( pix_fmt == PIX_FMT_YUVA420P || pix_fmt == PIX_FMT_YUVA444P ) &&
+       if ( ( pix_fmt == PIX_FMT_YUVA420P
+#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(35<<8)+0)
+                       || pix_fmt == PIX_FMT_YUVA444P
+#endif
+                       ) &&
                *format != mlt_image_rgb24a && *format != mlt_image_opengl &&
                frame->data[3] && frame->linesize[3] )
        {