summaryrefslogtreecommitdiff
path: root/community/synfig/build-fix.patch
blob: 9124a517a77f8619998b75e63a3a96d820ee6004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff -wbBur synfig-core/src/modules/mod_libavcodec/trgt_av.cpp synfig-core.my/src/modules/mod_libavcodec/trgt_av.cpp
--- synfig-core/src/modules/mod_libavcodec/trgt_av.cpp	2011-06-05 13:04:07.000000000 +0400
+++ synfig-core.my/src/modules/mod_libavcodec/trgt_av.cpp	2011-06-14 14:32:49.000000000 +0400
@@ -31,6 +31,10 @@
 #	include <config.h>
 #endif
 
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+#include <libswscale/swscale.h>
+
 #include "trgt_av.h"
 
 extern "C"
@@ -116,14 +120,14 @@
     picture = avcodec_alloc_frame();
     if (!picture)
         return NULL;
-    size = avpicture_get_size(pix_fmt, width, height);
+    size = avpicture_get_size((enum ::PixelFormat)pix_fmt, width, height);
     picture_buf = (uint8_t *)malloc(size);
     if (!picture_buf) {
         av_free(picture);
         return NULL;
     }
     avpicture_fill((AVPicture *)picture, picture_buf,
-                   pix_fmt, width, height);
+                   (enum ::PixelFormat)pix_fmt, width, height);
     return picture;
 }
 
diff -wbBur synfig-core/src/modules/mod_png/mptr_png.cpp synfig-core.my/src/modules/mod_png/mptr_png.cpp
--- synfig-core/src/modules/mod_png/mptr_png.cpp	2011-06-05 13:04:07.000000000 +0400
+++ synfig-core.my/src/modules/mod_png/mptr_png.cpp	2011-06-14 14:32:49.000000000 +0400
@@ -309,7 +309,7 @@
 				float b=gamma().b_U8_to_F32((unsigned char)png_ptr->palette[row_pointers[y][x]].blue);
 				float a=1.0;
 				if(info_ptr->valid & PNG_INFO_tRNS)
-				    a = (float)(unsigned char)png_ptr->trans[row_pointers[y][x]]*(1.0/255.0);
+				    a = (float)(unsigned char)png_ptr->trans_alpha[row_pointers[y][x]]*(1.0/255.0);
 				surface_buffer[y][x]=Color(
 					r,
 					g,