Package: ffmpeg-php Version: 0.6.0-2 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oneiric ubuntu-patch
Hi, *** /tmp/tmpaXlG6U In Ubuntu, the attached patch was applied to achieve the following: * Fix FTBFS with ffmpeg >= 0.6 - Add fix_ftbfs_pix_fmt_rgba32.patch Thanks for considering the patch. -- System Information: Debian Release: squeeze/sid APT prefers natty-updates APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 'natty-proposed'), (500, 'natty') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-11-generic (SMP w/2 CPU cores) Locale: LANG=es_ES.UTF8, LC_CTYPE=es_ES.UTF8 (charmap=UTF-8) (ignored: LC_ALL set to es_ES.UTF8) Shell: /bin/sh linked to /bin/dash
diff -u ffmpeg-php-0.6.0/debian/patches/series ffmpeg-php-0.6.0/debian/patches/series --- ffmpeg-php-0.6.0/debian/patches/series +++ ffmpeg-php-0.6.0/debian/patches/series @@ -3,0 +4 @@ +fix_ftbfs_pix_fmt_rgba32.patch only in patch2: unchanged: --- ffmpeg-php-0.6.0.orig/debian/patches/fix_ftbfs_pix_fmt_rgba32.patch +++ ffmpeg-php-0.6.0/debian/patches/fix_ftbfs_pix_fmt_rgba32.patch @@ -0,0 +1,47 @@ +Description: Fix FTBFS with ffmpeg >= 0.6 as it doesn't define PIX_FMT_RGBA32 anymore. +Author: Felix Geyer <debfx-...@fobos.de> +Origin: backport, http://ffmpeg-php.svn.sourceforge.net/viewvc/ffmpeg-php?view=rev&revision=677 + +diff -Nur ffmpeg-php-0.6.0/ffmpeg_frame.c ffmpeg-php-0.6.0.patch/ffmpeg_frame.c +--- ffmpeg-php-0.6.0/ffmpeg_frame.c 2008-10-14 01:02:01.000000000 +0200 ++++ ffmpeg-php-0.6.0.patch/ffmpeg_frame.c 2010-06-03 16:13:17.596647216 +0200 +@@ -60,6 +60,12 @@ + ZEND_FETCH_RESOURCE(gd_img, gdImagePtr, ret, -1, "Image", le_gd); \ + } + ++#if PIX_FMT_RGBA32 ++#define FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT PIX_FMT_RGBA32 ++#else ++#define FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT PIX_FMT_RGB32 ++#endif ++ + // Borrowed from gd.c + #define gdImageBoundsSafeMacro(im, x, y) (!((((y) < (im)->cy1) || ((y) > (im)->cy2)) || (((x) < (im)->cx1) || ((x) > (im)->cx2)))) + +@@ -333,7 +339,7 @@ + + GET_FRAME_RESOURCE(getThis(), ff_frame); + +- _php_convert_frame(ff_frame, PIX_FMT_RGBA32); ++ _php_convert_frame(ff_frame, FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT); + + return_value->value.lval = _php_get_gd_image(ff_frame->width, + ff_frame->height); +@@ -418,7 +424,7 @@ + + /* create a an av_frame and allocate space for it */ + frame = avcodec_alloc_frame(); +- avpicture_alloc((AVPicture*)frame, PIX_FMT_RGBA32, width, height); ++ avpicture_alloc((AVPicture*)frame, FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT, width, height); + + /* copy the gd image to the av_frame */ + _php_gd_image_to_avframe(gd_img, frame, width, height); +@@ -429,7 +435,7 @@ + /* set the ffpmeg_frame's properties */ + ff_frame->width = width; + ff_frame->height = height; +- ff_frame->pixel_format = PIX_FMT_RGBA32; ++ ff_frame->pixel_format = FFMPEG_PHP_FFMPEG_RGB_PIX_FORMAT; + break; + default: + zend_error(E_ERROR, "Invalid argument\n");