919d31ec56f89a40b9b9f502248def34958ca8dc
[packages/vcmi.git] / ffmpeg3.patch
1 diff -ur vcmi-0.98.orig/client/CVideoHandler.cpp vcmi-0.98/client/CVideoHandler.cpp
2 --- vcmi-0.98.orig/client/CVideoHandler.cpp     2015-04-01 09:34:22.000000000 +0200
3 +++ vcmi-0.98/client/CVideoHandler.cpp  2016-03-29 01:45:43.689696331 +0200
4 @@ -155,7 +155,7 @@
5         }\r
6  \r
7         // Allocate video frame\r
8 -       frame = avcodec_alloc_frame();\r
9 +       frame = av_frame_alloc();\r
10         \r
11         //setup scaling\r
12         \r
13 @@ -201,21 +201,21 @@
14  #endif\r
15         { // Convert the image into YUV format that SDL uses\r
16                 sws = sws_getContext(codecContext->width, codecContext->height, codecContext->pix_fmt, \r
17 -                                                        pos.w, pos.h, PIX_FMT_YUV420P, \r
18 +                                                        pos.w, pos.h, AV_PIX_FMT_YUV420P, \r
19                                                          SWS_BICUBIC, nullptr, nullptr, nullptr);\r
20         }\r
21         else\r
22         {\r
23  \r
24 -               PixelFormat screenFormat = PIX_FMT_NONE;\r
25 +               AVPixelFormat screenFormat = AV_PIX_FMT_NONE;\r
26                 if (screen->format->Bshift > screen->format->Rshift)\r
27                 {\r
28                         // this a BGR surface\r
29                         switch (screen->format->BytesPerPixel)\r
30                         {\r
31 -                               case 2: screenFormat = PIX_FMT_BGR565; break;\r
32 -                               case 3: screenFormat = PIX_FMT_BGR24; break;\r
33 -                               case 4: screenFormat = PIX_FMT_BGR32; break;\r
34 +                               case 2: screenFormat = AV_PIX_FMT_BGR565; break;\r
35 +                               case 3: screenFormat = AV_PIX_FMT_BGR24; break;\r
36 +                               case 4: screenFormat = AV_PIX_FMT_BGR32; break;\r
37                                 default: return false;\r
38                         }\r
39                 }\r
40 @@ -224,9 +224,9 @@
41                         // this a RGB surface\r
42                         switch (screen->format->BytesPerPixel)\r
43                         {\r
44 -                               case 2: screenFormat = PIX_FMT_RGB565; break;\r
45 -                               case 3: screenFormat = PIX_FMT_RGB24; break;\r
46 -                               case 4: screenFormat = PIX_FMT_RGB32; break;\r
47 +                               case 2: screenFormat = AV_PIX_FMT_RGB565; break;\r
48 +                               case 3: screenFormat = AV_PIX_FMT_RGB24; break;\r
49 +                               case 4: screenFormat = AV_PIX_FMT_RGB32; break;\r
50                                 default: return false;\r
51                         }\r
52                 }\r
This page took 0.030644 seconds and 2 git commands to generate.