summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2013-11-03 11:02:21 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-04 00:46:03 -0600
commit32c07cd361d45b114beb62455c0038f2f0789f4a (patch)
treee9366617236bb6121874dd8e8b48b653f08be0ef /libraries
parent72516c852f4987d0d7719b6f9568f778a83612e7 (diff)
downloadslackbuilds-32c07cd361d45b114beb62455c0038f2f0789f4a.tar.gz
libraries/libquicktime: Fix building with new ffmpeg.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/libquicktime/libquicktime-1.2.4-ffmpeg2.patch98
-rw-r--r--libraries/libquicktime/libquicktime.SlackBuild7
2 files changed, 103 insertions, 2 deletions
diff --git a/libraries/libquicktime/libquicktime-1.2.4-ffmpeg2.patch b/libraries/libquicktime/libquicktime-1.2.4-ffmpeg2.patch
new file mode 100644
index 0000000000..7add44220a
--- /dev/null
+++ b/libraries/libquicktime/libquicktime-1.2.4-ffmpeg2.patch
@@ -0,0 +1,98 @@
+Extracted from upstream CVS.
+https://bugs.gentoo.org/show_bug.cgi?id=476498
+
+Index: libquicktime-1.2.4/plugins/ffmpeg/audio.c
+===================================================================
+--- libquicktime-1.2.4.orig/plugins/ffmpeg/audio.c
++++ libquicktime-1.2.4/plugins/ffmpeg/audio.c
+@@ -45,6 +45,11 @@
+ #define ENCODE_AUDIO 1
+ #endif
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++/* from libavcodec/avcodec.h dated Dec 23 2012 */
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+ /* The following code was ported from gmerlin_avdecoder (http://gmerlin.sourceforge.net) */
+
+ /* MPEG Audio header parsing code */
+Index: libquicktime-1.2.4/plugins/ffmpeg/params.c
+===================================================================
+--- libquicktime-1.2.4.orig/plugins/ffmpeg/params.c
++++ libquicktime-1.2.4/plugins/ffmpeg/params.c
+@@ -101,6 +101,17 @@ typedef struct
+ } \
+ }
+
++#define PARAM_DICT_INT(name, dict_name) \
++ { \
++ if(!strcasecmp(name, key)) \
++ { \
++ char buf[128]; \
++ snprintf(buf, sizeof(buf), "%d", *(int*)value); \
++ av_dict_set(options, dict_name, buf, 0); \
++ found = 1; \
++ } \
++ }
++
+ #define PARAM_DICT_FLAG(name, dict_name) \
+ { \
+ if(!strcasecmp(name, key)) \
+@@ -202,8 +213,15 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_INT("ff_max_b_frames",max_b_frames);
+ PARAM_FLOAT("ff_b_quant_factor",b_quant_factor);
+ PARAM_INT("ff_b_frame_strategy",b_frame_strategy);
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_INT("ff_luma_elim_threshold","luma_elim_threshold");
++ PARAM_DICT_INT("ff_chroma_elim_threshold","chroma_elim_threshold");
++#else
+ PARAM_INT("ff_luma_elim_threshold",luma_elim_threshold);
+ PARAM_INT("ff_chroma_elim_threshold",chroma_elim_threshold);
++#endif
++
+ PARAM_INT("ff_strict_std_compliance",strict_std_compliance);
+ PARAM_QP2LAMBDA("ff_b_quant_offset",b_quant_offset);
+ PARAM_INT("ff_rc_min_rate",rc_min_rate);
+@@ -241,8 +259,15 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_QP2LAMBDA("ff_lmax", lmax);
+ PARAM_INT("ff_noise_reduction",noise_reduction);
+ PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000);
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_INT("ff_inter_threshold","inter_threshold");
++ PARAM_DICT_INT("ff_quantizer_noise_shaping","quantizer_noise_shaping");
++#else
+ PARAM_INT("ff_inter_threshold",inter_threshold);
+ PARAM_INT("ff_quantizer_noise_shaping",quantizer_noise_shaping);
++#endif
++
+ PARAM_INT("ff_thread_count",thread_count);
+ PARAM_INT("ff_me_threshold",me_threshold);
+ PARAM_INT("ff_mb_threshold",mb_threshold);
+@@ -272,8 +297,16 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_FLAG("ff_flag_bitexact",CODEC_FLAG_BITEXACT);
+ PARAM_FLAG("ff_flag_ac_pred",CODEC_FLAG_AC_PRED);
+ // PARAM_FLAG("ff_flag_h263p_umv",CODEC_FLAG_H263P_UMV); // Unused
++
++#if LIBAVCODEC_VERSION_MAJOR >= 55
++ PARAM_DICT_FLAG("ff_flag_cbp_rd","cbp_rd");
++ PARAM_DICT_FLAG("ff_flag_qp_rd","qp_rd");
++ PARAM_DICT_FLAG("ff_flag2_strict_gop","strict_gop");
++#else
+ PARAM_FLAG("ff_flag_cbp_rd",CODEC_FLAG_CBP_RD);
+ PARAM_FLAG("ff_flag_qp_rd",CODEC_FLAG_QP_RD);
++ PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
++#endif
+
+ #if LIBAVCODEC_VERSION_MAJOR >= 54
+ PARAM_DICT_FLAG("ff_flag_h263p_aiv", "aiv");
+@@ -288,7 +321,6 @@ void lqt_ffmpeg_set_parameter(AVCodecCon
+ PARAM_FLAG("ff_flag_loop_filter",CODEC_FLAG_LOOP_FILTER);
+ PARAM_FLAG("ff_flag_closed_gop",CODEC_FLAG_CLOSED_GOP);
+ PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST);
+- PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
+ PARAM_ENUM("ff_coder_type",coder_type,coder_type);
+
+ }
diff --git a/libraries/libquicktime/libquicktime.SlackBuild b/libraries/libquicktime/libquicktime.SlackBuild
index fd81aa3d0b..6aac11ee13 100644
--- a/libraries/libquicktime/libquicktime.SlackBuild
+++ b/libraries/libquicktime/libquicktime.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for libquicktime
-# Copyright 2008-2012 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PRGNAM=libquicktime
VERSION=1.2.4
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -65,6 +65,9 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+# Fix compatibility with ffmpeg 2.x
+patch -p1 -i $CWD/libquicktime-1.2.4-ffmpeg2.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \