1 |
grknight 15/06/24 01:02:47 |
2 |
|
3 |
Added: ffmpeg-php-0.6.0-libav10.patch |
4 |
Log: |
5 |
Fix build failures wrt bug 545700 ; Revbump to include the libav IUSE so we can rebuilt against libav/ffmpeg subslots |
6 |
|
7 |
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xD1F781EFF9F4A3B6) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-php/ffmpeg-php/files/ffmpeg-php-0.6.0-libav10.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/ffmpeg-php/files/ffmpeg-php-0.6.0-libav10.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-php/ffmpeg-php/files/ffmpeg-php-0.6.0-libav10.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ffmpeg-php-0.6.0-libav10.patch |
16 |
=================================================================== |
17 |
diff -aurN a/ffmpeg_movie.c b/ffmpeg_movie.c |
18 |
--- a/ffmpeg_movie.c 2015-06-22 19:46:01.220498329 -0400 |
19 |
+++ b/ffmpeg_movie.c 2015-06-22 20:44:26.802671398 -0400 |
20 |
@@ -697,7 +697,16 @@ |
21 |
return rate; |
22 |
} |
23 |
|
24 |
-#if LIBAVCODEC_BUILD > 4753 |
25 |
+#if LIBAVCODEC_BUILD > 3604480 /* libav-10 */ |
26 |
+ if (GET_CODEC_FIELD(st->codec, codec_type) == AVMEDIA_TYPE_VIDEO){ |
27 |
+ if (st->avg_frame_rate.den && st->avg_frame_rate.num) { |
28 |
+ rate = av_q2d(st->avg_frame_rate); |
29 |
+ } else { |
30 |
+ rate = 1 / av_q2d(GET_CODEC_FIELD(st->codec, time_base)); |
31 |
+ } |
32 |
+ } |
33 |
+ return (float)rate; |
34 |
+#elif LIBAVCODEC_BUILD > 4753 |
35 |
if (GET_CODEC_FIELD(st->codec, codec_type) == AVMEDIA_TYPE_VIDEO){ |
36 |
if (st->r_frame_rate.den && st->r_frame_rate.num) { |
37 |
rate = av_q2d(st->r_frame_rate); |
38 |
@@ -980,14 +980,22 @@ |
39 |
if (p) { |
40 |
codec_name = p->name; |
41 |
#ifdef FF_API_SUB_ID |
42 |
+#if LIBAVCODEC_BUILD > 3604480 /* libav-10 */ |
43 |
+ if (decoder_ctx->codec_id == AV_CODEC_ID_MP3) { |
44 |
+#else |
45 |
if (decoder_ctx->codec_id == CODEC_ID_MP3) { |
46 |
+#endif |
47 |
if (decoder_ctx->sub_id == 2) |
48 |
codec_name = "mp2"; |
49 |
else if (decoder_ctx->sub_id == 1) |
50 |
codec_name = "mp1"; |
51 |
} |
52 |
#endif |
53 |
+#if LIBAVCODEC_BUILD > 3604480 /* libav-10 */ |
54 |
+ } else if (decoder_ctx->codec_id == AV_CODEC_ID_MPEG2TS) { |
55 |
+#else |
56 |
} else if (decoder_ctx->codec_id == CODEC_ID_MPEG2TS) { |
57 |
+#endif |
58 |
/* fake mpeg2 transport stream codec (currently not registered) */ |
59 |
codec_name = "mpeg2ts"; |
60 |
} else if (decoder_ctx->codec_name[0] != '\0') { |