Your message dated Sat, 06 Feb 2016 22:23:18 +0000
with message-id <e1asbga-00073i...@franck.debian.org>
and subject line Bug#803811: fixed in ffmpeg2theora 0.30-1
has caused the Debian Bug report #803811,
regarding ffmpeg2theora: FTBFS with FFmpeg 2.9
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
803811: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803811
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: ffmpeg2theora
Version: 0.29.0~git+20140316-3
Severity: important
Tags: patch
User: pkg-multimedia-maintainers@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 are non-trivial and should be runtime-tested.

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..9c0dfb0
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,205 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
+Last-Update: <2015-11-02>
+
+--- ffmpeg2theora-0.29.0~git+20140316.orig/src/avinfo.c
++++ ffmpeg2theora-0.29.0~git+20140316/src/avinfo.c
+@@ -178,8 +178,6 @@ void json_codec_info(FILE *output, AVCod
+         /* fake mpeg2 transport stream codec (currently not
+            registered) */
+         codec_name = "mpeg2ts";
+-    } else if (enc->codec_name[0] != '\0') {
+-        codec_name = enc->codec_name;
+     } else {
+         /* output avi tags */
+         if(   isprint(enc->codec_tag&0xFF) && isprint((enc->codec_tag>>8)&0xFF)
+@@ -200,7 +198,7 @@ void json_codec_info(FILE *output, AVCod
+     case AVMEDIA_TYPE_VIDEO:
+         codec_name = fix_codec_name(codec_name);
+         json_add_key_value(output, "codec", (void *)codec_name, JSON_STRING, 0, indent);
+-        if (enc->pix_fmt != PIX_FMT_NONE) {
++        if (enc->pix_fmt != AV_PIX_FMT_NONE) {
+             json_add_key_value(output, "pixel_format", (void *)av_get_pix_fmt_name(enc->pix_fmt), JSON_STRING, 0, indent);
+         }
+         if (enc->width) {
+--- ffmpeg2theora-0.29.0~git+20140316.orig/src/ffmpeg2theora.c
++++ ffmpeg2theora-0.29.0~git+20140316/src/ffmpeg2theora.c
+@@ -148,13 +148,13 @@ static AVFrame *frame_alloc(int pix_fmt,
+     uint8_t *picture_buf;
+     int size;
+ 
+-    picture = avcodec_alloc_frame();
++    picture = av_frame_alloc();
+     if (!picture)
+         return NULL;
+     size = avpicture_get_size (pix_fmt, width, height);
+     picture_buf = av_malloc (size);
+     if (!picture_buf) {
+-        av_free (picture);
++        av_frame_free (&picture);
+         return NULL;
+     }
+     avpicture_fill((AVPicture *) picture, picture_buf, pix_fmt, width, height);
+@@ -167,7 +167,7 @@ static AVFrame *frame_alloc(int pix_fmt,
+ static void frame_dealloc(AVFrame *frame) {
+     if (frame) {
+         avpicture_free((AVPicture*)frame);
+-        av_free(frame);
++        av_frame_free(&frame);
+     }
+ }
+ 
+@@ -231,7 +231,7 @@ static ff2theora ff2theora_init() {
+         this->kate_streams=NULL;
+         this->ignore_non_utf8 = 0;
+ 
+-        this->pix_fmt = PIX_FMT_YUV420P;
++        this->pix_fmt = AV_PIX_FMT_YUV420P;
+ 
+         // ffmpeg2theora --nosound -f dv -H 32000 -S 0 -v 8 -x 384 -y 288 -G 1.5 input.dv
+         this->video_gamma  = 0.0;
+@@ -521,6 +521,74 @@ static const char *find_language_for_sub
+   return lang;
+ }
+ 
++static void delete_filter_graph(ff2theora this) {
++    if (this->filter_graph) {
++        av_frame_free(&this->filter_frame);
++        avfilter_graph_free(&this->filter_graph);
++    }
++}
++
++static int init_filter_graph(ff2theora this, enum AVPixelFormat pixfmt, int width, int height) {
++    AVFilterInOut *inputs = NULL, *outputs = NULL;
++    char args[512];
++    int res;
++
++    delete_filter_graph(this);
++    this->filter_graph = avfilter_graph_alloc();
++    snprintf(args, sizeof(args),
++             "buffer=video_size=%dx%d:pix_fmt=%d:time_base=1/1:pixel_aspect=0/1[in];"
++             "[in]yadif[out];"
++             "[out]buffersink",
++             width, height, pixfmt);
++    res = avfilter_graph_parse2(this->filter_graph, args, &inputs, &outputs);
++    if (res < 0)
++        return res;
++    if(inputs || outputs)
++        return -1;
++    res = avfilter_graph_config(this->filter_graph, NULL);
++    if (res < 0)
++        return res;
++
++    this->buffersrc_ctx = avfilter_graph_get_filter(this->filter_graph, "Parsed_buffer_0");
++    this->buffersink_ctx = avfilter_graph_get_filter(this->filter_graph, "Parsed_buffersink_2");
++    if (!this->buffersrc_ctx || !this->buffersink_ctx)
++        return -1;
++    this->filter_frame = av_frame_alloc();
++    this->last_width = width;
++    this->last_height = height;
++    this->last_pixfmt = pixfmt;
++
++    return 0;
++}
++
++static int process_filter_graph(ff2theora this, AVPicture *dst, const AVPicture *src,
++                                enum AVPixelFormat pixfmt, int width, int height) {
++    int res;
++
++    if (!this->filter_graph || width != this->last_width ||
++        height != this->last_height || pixfmt != this->last_pixfmt) {
++        res = init_filter_graph(this, pixfmt, width, height);
++        if (res < 0)
++            return res;
++    }
++
++    memcpy(this->filter_frame->data, src->data, sizeof(src->data));
++    memcpy(this->filter_frame->linesize, src->linesize, sizeof(src->linesize));
++    this->filter_frame->width = width;
++    this->filter_frame->height = height;
++    this->filter_frame->format = pixfmt;
++    res = av_buffersrc_add_frame(this->buffersrc_ctx, this->filter_frame);
++    if (res < 0)
++        return res;
++    res = av_buffersink_get_frame(this->buffersink_ctx, this->filter_frame);
++    if (res < 0)
++        return res;
++    av_picture_copy(dst, (const AVPicture *) this->filter_frame, pixfmt, width, height);
++    av_frame_unref(this->filter_frame);
++
++    return 0;
++}
++
+ void ff2theora_output(ff2theora this) {
+     unsigned int i;
+     AVCodecContext *aenc = NULL;
+@@ -1468,7 +1536,7 @@ void ff2theora_output(ff2theora this) {
+                             }
+                             if ((this->deinterlace==0 && frame->interlaced_frame) ||
+                                 this->deinterlace==1) {
+-                                if (avpicture_deinterlace((AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) {
++                                if (process_filter_graph(this, (AVPicture *)output,(AVPicture *)output_tmp,this->pix_fmt,display_width,display_height)<0) {
+                                         fprintf(stderr, "Deinterlace failed.\n");
+                                         exit(1);
+                                 }
+@@ -1565,7 +1633,7 @@ void ff2theora_output(ff2theora this) {
+                     int bytes_per_sample = av_get_bytes_per_sample(aenc->sample_fmt);
+ 
+                     if (avpkt.size > 0) {
+-                        if (!audio_frame && !(audio_frame = avcodec_alloc_frame())) {
++                        if (!audio_frame && !(audio_frame = av_frame_alloc())) {
+                             fprintf(stderr, "Failed to allocate memory\n");
+                             exit(1);
+                         }
+@@ -1615,7 +1683,7 @@ void ff2theora_output(ff2theora this) {
+                             }
+                         }
+                         oggmux_add_audio(&info, audio_p, dst_nb_samples, audio_eos);
+-                        avcodec_free_frame(&audio_frame);
++                        av_frame_free(&audio_frame);
+                         this->sample_count += dst_nb_samples;
+                     }
+                     if(audio_eos) {
+@@ -1816,7 +1884,7 @@ void ff2theora_output(ff2theora this) {
+         if (ppContext)
+             pp_free_context(ppContext);
+         if (!info.audio_only) {
+-            av_free(frame_p);
++            av_frame_free(&frame_p);
+             frame_dealloc(output_p);
+             frame_dealloc(output_tmp_p);
+             frame_dealloc(output_resized_p);
+@@ -1837,6 +1905,7 @@ void ff2theora_output(ff2theora this) {
+ }
+ 
+ void ff2theora_close(ff2theora this) {
++    delete_filter_graph(this);
+     sws_freeContext(this->sws_colorspace_ctx);
+     sws_freeContext(this->sws_scale_ctx);
+     this->sws_colorspace_ctx = NULL;
+--- ffmpeg2theora-0.29.0~git+20140316.orig/src/ffmpeg2theora.h
++++ ffmpeg2theora-0.29.0~git+20140316/src/ffmpeg2theora.h
+@@ -2,6 +2,9 @@
+ #define _F2T_FFMPEG2THEORA_H_
+ 
+ #include "subtitles.h"
++#include <libavfilter/avfilter.h>
++#include <libavfilter/buffersrc.h>
++#include <libavfilter/buffersink.h>
+ 
+ typedef struct ff2theora_subtitle{
+     char *text;
+@@ -117,6 +120,13 @@ typedef struct ff2theora{
+     unsigned char y_lut[256];
+     unsigned char uv_lut[256];
+ 
++    AVFilterContext *buffersink_ctx;
++    AVFilterContext *buffersrc_ctx;
++    AVFilterGraph *filter_graph;
++    AVFrame *filter_frame;
++    int last_width;
++    int last_height;
++    enum AVPixelFormat last_pixfmt;
+ }
+ *ff2theora;
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 433f5a7..270d545 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 #003-libswresample.patch
 libavresample.patch
 link-libm.patch
+ffmpeg_2.9.patch

--- End Message ---
--- Begin Message ---
Source: ffmpeg2theora
Source-Version: 0.30-1

We believe that the bug you reported is fixed in the latest version of
ffmpeg2theora, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 803...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Ramacher <sramac...@debian.org> (supplier of updated ffmpeg2theora 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 06 Feb 2016 22:10:40 +0100
Source: ffmpeg2theora
Binary: ffmpeg2theora
Architecture: source
Version: 0.30-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers 
<pkg-multimedia-maintainers@lists.alioth.debian.org>
Changed-By: Sebastian Ramacher <sramac...@debian.org>
Description:
 ffmpeg2theora - Theora video encoder using ffmpeg
Closes: 803811
Changes:
 ffmpeg2theora (0.30-1) unstable; urgency=medium
 .
   * Team upload.
   * New upstream release.
     - Fix building against FFmpeg 2.9/3.0. (Closes: #803811)
   * debian/patches/libavresample.patch: Removed, no longer needed.
   * debian/control:
     - Update Standards-Version.
     - Update B-D for ffmpeg.
     - Update Vcs-*.
   * debian/rules: Honor CFLAGS, LDFLAGS and CPPFLAGS.
   * debian/{control,compat}: Bump compat for automatic dbg packages.
Checksums-Sha1:
 5534d578b22d3f32ad643a0fd434668d63169ec2 2299 ffmpeg2theora_0.30-1.dsc
 fc7ca91eb9e5e1b920273c0b2a73ae737fa5cd29 91269 ffmpeg2theora_0.30.orig.tar.bz2
 c253137f8cc10bc82bfde665fd432cc32cc6883d 3920 
ffmpeg2theora_0.30-1.debian.tar.xz
Checksums-Sha256:
 d05184357819db6e2741c18edfbad7b40e00580a85df733af6514497ab150863 2299 
ffmpeg2theora_0.30-1.dsc
 4f6464b444acab5d778e0a3359d836e0867a3dcec4ad8f1cdcf87cb711ccc6df 91269 
ffmpeg2theora_0.30.orig.tar.bz2
 6becfa2bc2f7efc669a9a72e173c1edb41e8132b67b0e3146069156bdaec7c92 3920 
ffmpeg2theora_0.30-1.debian.tar.xz
Files:
 2a7b426a9aa8f18e932f914f22ccc0c5 2299 video optional ffmpeg2theora_0.30-1.dsc
 b1f0c21097e236c0a4558415a914458f 91269 video optional 
ffmpeg2theora_0.30.orig.tar.bz2
 8b2458a95897df4a8e3dfc5e2ca812c0 3920 video optional 
ffmpeg2theora_0.30-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJWtmKdAAoJEGny/FFupxmT3CMP/RWshrXSAsR+3l7j2JQXfkKC
VBatDKontsMjWuXNdkO8CEIRdZiiCjVz+FbxmfEAMNlk2u6+vlqTBOvYhYO8fUbZ
9iPkGqHlbJkqCVzwbc34U/4mLHnPelo5uugbif5ErGwfok3HW7YJ7ZFymdJ5DPoM
pjEQHvEmRfEZpx7tffJ8rKfUYKuGPik9qz/DLgKP+SSymftBLt2hpk5Ec+bNEI0N
zhbbOe+AFRenlChiYMwDY3sqKEAlfE7CB+VWoBJEii71LMuMiWZUPNmz5tFVza3d
wxY4m6BYq6P0T7Kkv1lXw8kuyYisMziYl1YaL9liMCqumSFNW/WFjcRe3Kz1mdg3
hMLEk56AUnBp2Aevss3niyDc7GkKTRENb7A/tIg/wDhR4W65wwOT2s7gZIbNGHKF
l/FZ2jAUTWEng8nSw9WxbP9msSdB7ETUEvImhFsrgp8Rpe50mv4I2KCss7d7NrPx
NsVBloJ9N9VvX44yy+Y7N6qCa+zInnRxtVL8zJ+33j7mdgBRmGp0zsL9LowbX+cu
7/q9L73W8LkXTp2Hwu5eil+DmUVjBtYdrtSVoONuGgzSQt3WUAB3d3tor4cNQDJt
8Qe1Rb1e8gswI1DhxHD7O4hi8pXsIWYCN3DMF2+wuWl53RIgYFbhDrFtPFZluRDm
bIbhyjDWBv6JAYlq9Bqh
=03RH
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to