--- Begin Message ---
Package: libextractor
Version: 1.3-2
Severity: important
Tags: patch
User: pkg-multimedia-maintain...@lists.alioth.debian.org
Usertags: ffmpeg2.9
Dear Maintainer,
your package fails to build with the upcoming ffmpeg 2.9.
This bug will become release-critical at some point when the
ffmpeg2.9 transition gets closer.
Attached is a patch replacing the deprecated functionality.
It also works with ffmpeg 2.8.
Please apply this patch and forward it upstream, if necessary.
These changes have little regression potential.
Best regards,
Andreas
diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..050e318
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,168 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
+Last-Update: <2015-11-02>
+
+--- libextractor-1.3.orig/src/plugins/previewopus_extractor.c
++++ libextractor-1.3/src/plugins/previewopus_extractor.c
+@@ -296,7 +296,7 @@ static void init_packet(AVPacket *packet
+ /** Initialize one audio frame for reading from the input file */
+ static int init_input_frame(AVFrame **frame)
+ {
+- if (!(*frame = avcodec_alloc_frame())) {
++ if (!(*frame = av_frame_alloc())) {
+ #if DEBUG
+ fprintf(stderr, "Could not allocate input frame\n");
+ #endif
+@@ -655,7 +655,7 @@ cleanup:
+ av_freep(&converted_input_samples[0]);
+ free(converted_input_samples);
+ }
+- avcodec_free_frame(&input_frame);
++ av_frame_free(&input_frame);
+
+ return ret;
+ }
+@@ -671,7 +671,7 @@ static int init_output_frame(AVFrame **f
+ int error;
+
+ /** Create a new frame to store the audio samples. */
+- if (!(*frame = avcodec_alloc_frame())) {
++ if (!(*frame = av_frame_alloc())) {
+ #if DEBUG
+ fprintf(stderr, "Could not allocate output frame\n");
+ #endif
+@@ -702,7 +702,7 @@ static int init_output_frame(AVFrame **f
+ #if DEBUG
+ fprintf(stderr, "Could allocate output frame samples (error '%s')\n", get_error_text(error));
+ #endif
+- avcodec_free_frame(frame);
++ av_frame_free(frame);
+ return error;
+ }
+
+@@ -783,17 +783,17 @@ static int load_encode_and_write(AVAudio
+ #if DEBUG
+ fprintf(stderr, "Could not read data from FIFO\n");
+ #endif
+- avcodec_free_frame(&output_frame);
++ av_frame_free(&output_frame);
+ return AVERROR_EXIT;
+ }
+
+ /** Encode one frame worth of audio samples. */
+ if (encode_audio_frame(output_frame, output_format_context,
+ output_codec_context, &data_written)) {
+- avcodec_free_frame(&output_frame);
++ av_frame_free(&output_frame);
+ return AVERROR_EXIT;
+ }
+- avcodec_free_frame(&output_frame);
++ av_frame_free(&output_frame);
+ return 0;
+ }
+ /** Write the trailer of the output file container. */
+@@ -907,7 +907,7 @@ extract_audio (struct EXTRACTOR_ExtractC
+ return;
+ }
+
+- if (NULL == (frame = avcodec_alloc_frame ()))
++ if (NULL == (frame = av_frame_alloc ()))
+ {
+ #if DEBUG
+ fprintf (stderr,
+--- libextractor-1.3.orig/src/plugins/thumbnailffmpeg_extractor.c
++++ libextractor-1.3/src/plugins/thumbnailffmpeg_extractor.c
+@@ -153,7 +153,7 @@ seek_cb (void *opaque,
+ static size_t
+ create_thumbnail (int src_width, int src_height,
+ int src_stride[],
+- enum PixelFormat src_pixfmt,
++ enum AVPixelFormat src_pixfmt,
+ const uint8_t * const src_data[],
+ int dst_width, int dst_height,
+ uint8_t **output_data,
+@@ -189,7 +189,7 @@ create_thumbnail (int src_width, int src
+ if (NULL ==
+ (scaler_ctx =
+ sws_getContext (src_width, src_height, src_pixfmt,
+- dst_width, dst_height, PIX_FMT_RGB24,
++ dst_width, dst_height, AV_PIX_FMT_RGB24,
+ SWS_BILINEAR, NULL, NULL, NULL)))
+ {
+ #if DEBUG
+@@ -199,7 +199,7 @@ create_thumbnail (int src_width, int src
+ return 0;
+ }
+
+- if (NULL == (dst_frame = avcodec_alloc_frame ()))
++ if (NULL == (dst_frame = av_frame_alloc ()))
+ {
+ #if DEBUG
+ fprintf (stderr,
+@@ -209,18 +209,18 @@ create_thumbnail (int src_width, int src
+ return 0;
+ }
+ if (NULL == (dst_buffer =
+- av_malloc (avpicture_get_size (PIX_FMT_RGB24, dst_width, dst_height))))
++ av_malloc (avpicture_get_size (AV_PIX_FMT_RGB24, dst_width, dst_height))))
+ {
+ #if DEBUG
+ fprintf (stderr,
+ "Failed to allocate the destination image buffer\n");
+ #endif
+- av_free (dst_frame);
++ av_frame_free (&dst_frame);
+ sws_freeContext (scaler_ctx);
+ return 0;
+ }
+ avpicture_fill ((AVPicture *) dst_frame, dst_buffer,
+- PIX_FMT_RGB24, dst_width, dst_height);
++ AV_PIX_FMT_RGB24, dst_width, dst_height);
+ sws_scale (scaler_ctx,
+ src_data,
+ src_stride,
+@@ -255,7 +255,7 @@ create_thumbnail (int src_width, int src
+ }
+ encoder_codec_ctx->width = dst_width;
+ encoder_codec_ctx->height = dst_height;
+- encoder_codec_ctx->pix_fmt = PIX_FMT_RGB24;
++ encoder_codec_ctx->pix_fmt = AV_PIX_FMT_RGB24;
+ opts = NULL;
+ if (avcodec_open2 (encoder_codec_ctx, encoder_codec, &opts) < 0)
+ {
+@@ -410,7 +410,7 @@ extract_image (ENUM_CODEC_ID image_codec
+ return;
+ }
+ av_dict_free (&opts);
+- if (NULL == (frame = avcodec_alloc_frame ()))
++ if (NULL == (frame = av_frame_alloc ()))
+ {
+ #if DEBUG
+ fprintf (stderr,
+@@ -441,7 +441,7 @@ extract_image (ENUM_CODEC_ID image_codec
+ fprintf (stderr,
+ "Failed to decode a complete frame\n");
+ #endif
+- av_free (frame);
++ av_frame_free (&frame);
+ avcodec_close (codec_ctx);
+ av_free (codec_ctx);
+ return;
+@@ -563,7 +563,7 @@ extract_video (struct EXTRACTOR_ExtractC
+ return;
+ }
+
+- if (NULL == (frame = avcodec_alloc_frame ()))
++ if (NULL == (frame = av_frame_alloc ()))
+ {
+ #if DEBUG
+ fprintf (stderr,
+@@ -616,7 +616,7 @@ extract_video (struct EXTRACTOR_ExtractC
+ fprintf (stderr,
+ "Failed to decode a complete frame\n");
+ #endif
+- av_free (frame);
++ av_frame_free (&frame);
+ avcodec_close (codec_ctx);
+ avformat_close_input (&format_ctx);
+ av_free (io_ctx);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f762d21
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+ffmpeg_2.9.patch
--- End Message ---