]> git.pld-linux.org Git - packages/libextractor.git/blob - ffmpeg3.patch
- fix building with ffmpeg 3
[packages/libextractor.git] / ffmpeg3.patch
1 --- libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c~   2013-12-22 01:04:41.000000000 +0900
2 +++ libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c    2016-03-31 22:37:45.139770144 +0900
3 @@ -153,7 +153,7 @@
4  static size_t 
5  create_thumbnail (int src_width, int src_height, 
6                   int src_stride[],
7 -                 enum PixelFormat src_pixfmt, 
8 +                 enum AVPixelFormat src_pixfmt, 
9                   const uint8_t * const src_data[],
10                   int dst_width, int dst_height,
11                   uint8_t **output_data, 
12 @@ -189,7 +189,7 @@
13    if (NULL == 
14        (scaler_ctx =
15         sws_getContext (src_width, src_height, src_pixfmt,
16 -                      dst_width, dst_height, PIX_FMT_RGB24, 
17 +                      dst_width, dst_height, AV_PIX_FMT_RGB24, 
18                        SWS_BILINEAR, NULL, NULL, NULL)))
19      {
20  #if DEBUG
21 @@ -209,7 +209,7 @@
22        return 0;
23      }
24    if (NULL == (dst_buffer =
25 -              av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height))))
26 +              av_malloc (avpicture_get_size (AV_PIX_FMT_RGB24, dst_width, dst_height))))
27      {
28  #if DEBUG
29        fprintf (stderr,
30 @@ -220,7 +220,7 @@
31        return 0;
32      }
33    avpicture_fill ((AVPicture *) dst_frame, dst_buffer,
34 -                  PIX_FMT_RGB24, dst_width, dst_height);
35 +                  AV_PIX_FMT_RGB24, dst_width, dst_height);
36    sws_scale (scaler_ctx,
37               src_data, 
38               src_stride,
39 @@ -255,7 +255,7 @@
40      }
41    encoder_codec_ctx->width = dst_width;
42    encoder_codec_ctx->height = dst_height;
43 -  encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24;
44 +  encoder_codec_ctx->pix_fmt = AV_PIX_FMT_RGB24;
45    opts = NULL;
46    if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0)
47      {
This page took 0.066301 seconds and 3 git commands to generate.