Control: tags -1 + patch

On 2013-08-25 15:19:41, David Suárez wrote:
> Source: miro
> Version: 4.0.4-1
> Severity: serious
> Tags: jessie sid
> User: debian...@lists.debian.org
> Usertags: qa-ftbfs-20130825 qa-ftbfs
> Justification: FTBFS on amd64
> 
> Hi,
> 
> During a rebuild of all packages in sid, your package failed to build on
> amd64.
> 
> Related to current libav9 transition (see #706798).
> 
> Relevant part (hopefully):
> > cc -I/usr/include/ffmpeg -c /«PKGBUILDDIR»/linux/miro-segmenter.c -o 
> > /«PKGBUILDDIR»/./build/miro-segmenter/«PKGBUILDDIR»/linux/miro-segmenter.o
> > /«PKGBUILDDIR»/linux/miro-segmenter.c: In function 'add_output_stream':
> > /«PKGBUILDDIR»/linux/miro-segmenter.c:43:19: warning: assignment makes 
> > pointer from integer without a cast [enabled by default]
> >      output_stream = av_new_stream(output_format_context, 0);
> >                    ^
> > /«PKGBUILDDIR»/linux/miro-segmenter.c: In function 'main':
> > /«PKGBUILDDIR»/linux/miro-segmenter.c:236:45: error: 'URL_WRONLY' 
> > undeclared (first use in this function)
> >      if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
> >                                              ^
> > /«PKGBUILDDIR»/linux/miro-segmenter.c:236:45: note: each undeclared 
> > identifier is reported only once for each function it appears in
> > error: command 'cc' failed with exit status 1
> > make: *** [debian/python-module-stampdir/miro] Error 1

The attached patch should fix this issue.

Regards
-- 
Sebastian Ramacher
diff -Nru miro-4.0.4/debian/changelog miro-4.0.4/debian/changelog
--- miro-4.0.4/debian/changelog	2012-01-02 23:11:27.000000000 +0100
+++ miro-4.0.4/debian/changelog	2013-09-03 00:23:05.000000000 +0200
@@ -1,3 +1,10 @@
+miro (4.0.4-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * debian/patches/libav9.patch: Fix building with libav 9. (Closes: #720810)
+
+ -- Sebastian Ramacher <sramac...@debian.org>  Mon, 02 Sep 2013 21:48:32 +0200
+
 miro (4.0.4-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru miro-4.0.4/debian/patches/libav9.patch miro-4.0.4/debian/patches/libav9.patch
--- miro-4.0.4/debian/patches/libav9.patch	1970-01-01 01:00:00.000000000 +0100
+++ miro-4.0.4/debian/patches/libav9.patch	2013-09-03 00:16:55.000000000 +0200
@@ -0,0 +1,118 @@
+Description: Fix building with libav 9
+Author: Sebastian Ramacher <sramac...@debian.org>
+Bug-Debian: http://bugs.debian.org/720810
+Last-Update: 2013-09-03
+
+--- a/linux/miro-segmenter.c
++++ b/linux/miro-segmenter.c
+@@ -40,7 +40,11 @@
+     AVCodecContext *output_codec_context;
+     AVStream *output_stream;
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    output_stream = avformat_new_stream(output_format_context, 0);
++#else
+     output_stream = av_new_stream(output_format_context, 0);
++#endif
+     if (!output_stream) {
+         fprintf(stderr, "Could not allocate stream\n");
+         exit(1);
+@@ -156,13 +160,21 @@
+         exit(1);
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    ret = avformat_open_input(&ic, input, ifmt, NULL);
++#else
+     ret = av_open_input_file(&ic, input, ifmt, 0, NULL);
++#endif
+     if (ret != 0) {
+         fprintf(stderr, "Could not open input file, make sure it is an mpegts file: %d\n", ret);
+         exit(1);
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    if (avformat_find_stream_info(ic, NULL) < 0) {
++#else
+     if (av_find_stream_info(ic) < 0) {
++#endif
+         fprintf(stderr, "Could not read stream information\n");
+         exit(1);
+     }
+@@ -215,12 +227,16 @@
+         }
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    av_dump_format(oc, 0, input, 1);
++#else
+     if (av_set_parameters(oc, NULL) < 0) {
+         fprintf(stderr, "Invalid output format parameters\n");
+         exit(1);
+     }
+ 
+     dump_format(oc, 0, input, 1);
++#endif
+ 
+     if (video_st) {
+         codec = avcodec_find_decoder(video_st->codec->codec_id);
+@@ -228,17 +244,29 @@
+             fprintf(stderr, "Could not find video decoder, key frames will not be honored\n");
+         }
+     
++#if LIBAVCODEC_VERSION_MAJOR >= 54
++        if (avcodec_open2(video_st->codec, codec, NULL) < 0) {
++#else
+         if (avcodec_open(video_st->codec, codec) < 0) {
++#endif
+             fprintf(stderr, "Could not open video decoder, key frames will not be honored\n");
+         }
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
++#else
+     if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#endif
+         fprintf(stderr, "Could not open '%s'\n", output_filename);
+         exit(1);
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    if (avformat_write_header(oc, NULL)) {
++#else
+     if (av_write_header(oc)) {
++#endif
+         fprintf(stderr, "Could not write mpegts header to first output file\n");
+ 
+         exit(1);
+@@ -274,10 +302,17 @@
+         }
+ 
+         if (segment_time - prev_segment_time >= segment_duration) {
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++            avio_flush(oc->pb);
++            avio_close(oc->pb);
++
++            if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
++#else
+             put_flush_packet(oc->pb);
+             url_fclose(oc->pb);
+ 
+             if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++#endif
+                 fprintf(stderr, "Could not open '%s'\n", output_filename);
+                 break;
+             }
+@@ -307,7 +342,11 @@
+         av_freep(&oc->streams[i]);
+     }
+ 
++#if LIBAVFORMAT_VERSION_MAJOR >= 54
++    avio_close(oc->pb);
++#else
+     url_fclose(oc->pb);
++#endif
+     av_free(oc);
+ 
+     /* End-of-transcode marker. */
diff -Nru miro-4.0.4/debian/patches/series miro-4.0.4/debian/patches/series
--- miro-4.0.4/debian/patches/series	2012-01-02 23:09:25.000000000 +0100
+++ miro-4.0.4/debian/patches/series	2013-09-02 21:48:20.000000000 +0200
@@ -2,3 +2,4 @@
 50_miro_debug_fix.patch
 100_catch_keyerror_in_update_items.patch
 120_miro.desktop.patch
+libav9.patch

Attachment: signature.asc
Description: Digital signature

Reply via email to