summaryrefslogtreecommitdiffstats
path: root/php-ffmpeg-build.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-ffmpeg-build.patch')
-rw-r--r--php-ffmpeg-build.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/php-ffmpeg-build.patch b/php-ffmpeg-build.patch
new file mode 100644
index 0000000..7215500
--- /dev/null
+++ b/php-ffmpeg-build.patch
@@ -0,0 +1,39 @@
+From 9a98d133ad7da1db84447183ec3f311b825c0407 Mon Sep 17 00:00:00 2001
+From: Antony Dovgal <tony@daylessday.org>
+Date: Sun, 5 May 2013 23:07:23 +0400
+Subject: [PATCH] fix issue #4 (sub_id was removed from decoder struct)
+
+---
+ ffmpeg_movie.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ffmpeg_movie.c b/ffmpeg_movie.c
+index 9c30dac..ef9987c 100644
+--- a/ffmpeg_movie.c
++++ b/ffmpeg_movie.c
+@@ -39,6 +39,7 @@
+ #include "ext/standard/info.h"
+
+ #include <libavcodec/avcodec.h>
++#include <libavcodec/version.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/pixfmt.h>
+ #include <libavutil/pixdesc.h>
+@@ -966,12 +967,14 @@ static const char* _php_get_codec_name(ff_movie_context *ffmovie_ctx, int type)
+ /* Copied from libavcodec/utils.c::avcodec_string */
+ if (p) {
+ codec_name = p->name;
++#ifdef FF_API_SUB_ID
+ if (decoder_ctx->codec_id == CODEC_ID_MP3) {
+ if (decoder_ctx->sub_id == 2)
+ codec_name = "mp2";
+ else if (decoder_ctx->sub_id == 1)
+ codec_name = "mp1";
+ }
++#endif
+ } else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) {
+ /* fake mpeg2 transport stream codec (currently not registered) */
+ codec_name = "mpeg2ts";
+--
+1.9.1
+