Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2016-01-10 Thread Andreas Cadhalpun
Control: tags -1 fixed-upstream

Hi Jan,

On 10.01.2016 06:43, Jan Gerber wrote:
> thanks for the patch. Applied to git and released a new version (0.30)

That's great!
Now we just need to update the Debian package to this version.

Best regards,
Andreas



Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2016-01-09 Thread Tiago Bortoletto Vaz
Hi Andreas,

I'm (slowly) coming back to my Debian work after a period in VAC. I'll
check this issue very soon, thanks for reporting. I have no problem at
with with NMU's in my packages, so if you think it needs more urgent
action please go ahead. I still need a few days to go over this.

Bests,

On Thu, Jan 07, 2016 at 11:38:48PM +0100, Andreas Cadhalpun wrote:
> Dear Maintainer,
> 
> the next version of FFmpeg is planned to be released this month
> (and it might be called 3.0 instead of 2.9).
> 
> Since I haven't heard back from you during the past two month
> I'm wondering what the status of this bug is:
>  * Are you aware of the patch I provided?
>  * Do you plan an upload soon?
>  * Is upstream aware of the problem?
> 
> If this bug isn't fixed soon, it will become release critical and
> thus the package will either get NMUed or removed from testing.
> 
> Best regards,
> Andreas
> 

-- 
tiago



Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2016-01-09 Thread Andreas Cadhalpun
Hi Tiago,

thanks for your reply.

On 09.01.2016 20:27, Tiago Bortoletto Vaz wrote:
> I'm (slowly) coming back to my Debian work after a period in VAC.

That's great!

> I'll
> check this issue very soon, thanks for reporting. I have no problem at
> with with NMU's in my packages, so if you think it needs more urgent
> action please go ahead. I still need a few days to go over this.

A few days are no problem, as this transition is going to start only
in a few weeks. And I'd really appreciate if you could do some
runtime testing of the changed code, as I don't know how to do that
and the change involving avpicture_deinterlace is not trivial.

By the way, I just noticed that this got disabled upstream [1].
I'm CC'ing the author of that commit to make him aware of my patch [2]
replacing avpicture_deinterlace with libavfilter functionality.

Best regards,
Andreas


1: 
https://git.xiph.org/?p=ffmpeg2theora.git;a=commitdiff;h=f4800440119849d6d2544e2aea41efca24f1c264
2: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803811;att=1;msg=5;filename=ffmpeg2theora_ffmpeg-2.9.patch



Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2016-01-09 Thread Jan Gerber
On 01/10/2016 01:11 AM, Andreas Cadhalpun wrote:
> By the way, I just noticed that this got disabled upstream [1].
> I'm CC'ing the author of that commit to make him aware of my patch [2]
> replacing avpicture_deinterlace with libavfilter functionality.
> 
> 1: 
> https://git.xiph.org/?p=ffmpeg2theora.git;a=commitdiff;h=f4800440119849d6d2544e2aea41efca24f1c264
> 2: 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803811;att=1;msg=5;filename=ffmpeg2theora_ffmpeg-2.9.patch
> 

Hi Andreas,

thanks for the patch. Applied to git and released a new version (0.30)

http://v2v.cc/~j/ffmpeg2theora/downloads/ffmpeg2theora-0.30.tar.bz2

j



Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2016-01-07 Thread Andreas Cadhalpun
Dear Maintainer,

the next version of FFmpeg is planned to be released this month
(and it might be called 3.0 instead of 2.9).

Since I haven't heard back from you during the past two month
I'm wondering what the status of this bug is:
 * Are you aware of the patch I provided?
 * Do you plan an upload soon?
 * Is upstream aware of the problem?

If this bug isn't fixed soon, it will become release critical and
thus the package will either get NMUed or removed from testing.

Best regards,
Andreas



Bug#803811: ffmpeg2theora: FTBFS with FFmpeg 2.9

2015-11-02 Thread Andreas Cadhalpun
Package: ffmpeg2theora
Version: 0.29.0~git+20140316-3
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 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 000..9c0dfb0
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,205 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun 
+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 ();
+ 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();
+ }
+ }
+ 
+@@ -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(>filter_frame);
++avfilter_graph_free(>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, , );
++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,