summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-11-18 21:36:10 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-19 01:10:59 -0600
commit791a83b86ed51a3515a53cc96fa13f543f1796e1 (patch)
tree79e8171698278a0013392ff1576e6a0cd467c9f7 /multimedia
parent6257edcc585af9eb9d7b771e0908ef9ac053f673 (diff)
downloadslackbuilds-791a83b86ed51a3515a53cc96fa13f543f1796e1.tar.gz
multimedia/cinelerra: Added some patches from Gentoo.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/cinelerra/cinelerra.SlackBuild2
-rw-r--r--multimedia/cinelerra/patches/01-cinelerra-entry.patch14
-rw-r--r--multimedia/cinelerra/patches/02-cinelerra-ffmpeg.patch (renamed from multimedia/cinelerra/patches/cinelerra-ffmpeg.patch)0
-rw-r--r--multimedia/cinelerra/patches/04-cinelerra-ffmpeg-0.11.patch (renamed from multimedia/cinelerra/patches/cinelerra-ffmpeg-0.11.patch)0
-rw-r--r--multimedia/cinelerra/patches/05-cinelerra-std_and_str_h.patch81
-rw-r--r--multimedia/cinelerra/patches/06-cinelerra-libav9.patch93
-rw-r--r--multimedia/cinelerra/patches/07-cinelerra-ffmpeg2.patch218
7 files changed, 407 insertions, 1 deletions
diff --git a/multimedia/cinelerra/cinelerra.SlackBuild b/multimedia/cinelerra/cinelerra.SlackBuild
index 5e2f369ca0..636bf5b3ad 100644
--- a/multimedia/cinelerra/cinelerra.SlackBuild
+++ b/multimedia/cinelerra/cinelerra.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=cinelerra
VERSION=${VERSION:-cv_2.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
diff --git a/multimedia/cinelerra/patches/01-cinelerra-entry.patch b/multimedia/cinelerra/patches/01-cinelerra-entry.patch
new file mode 100644
index 0000000000..5ece08c419
--- /dev/null
+++ b/multimedia/cinelerra/patches/01-cinelerra-entry.patch
@@ -0,0 +1,14 @@
+--- a/image/cinelerra.desktop
++++ b/image/cinelerra.desktop
+@@ -5,9 +5,8 @@
+ Name[fr]=Cinelerra
+ Name[es]=Cinelerra
+ Comment=Video Editor
+-Categories=Application;AudioVideo;Multimedia;
+-Encoding=UTF-8
++Categories=AudioVideo;
+ Exec=cinelerra
+-Icon=cinelerra.xpm
++Icon=cinelerra
+ Terminal=false
+ Type=Application
diff --git a/multimedia/cinelerra/patches/cinelerra-ffmpeg.patch b/multimedia/cinelerra/patches/02-cinelerra-ffmpeg.patch
index 6f7962fb1a..6f7962fb1a 100644
--- a/multimedia/cinelerra/patches/cinelerra-ffmpeg.patch
+++ b/multimedia/cinelerra/patches/02-cinelerra-ffmpeg.patch
diff --git a/multimedia/cinelerra/patches/cinelerra-ffmpeg-0.11.patch b/multimedia/cinelerra/patches/04-cinelerra-ffmpeg-0.11.patch
index 6d59cc8408..6d59cc8408 100644
--- a/multimedia/cinelerra/patches/cinelerra-ffmpeg-0.11.patch
+++ b/multimedia/cinelerra/patches/04-cinelerra-ffmpeg-0.11.patch
diff --git a/multimedia/cinelerra/patches/05-cinelerra-std_and_str_h.patch b/multimedia/cinelerra/patches/05-cinelerra-std_and_str_h.patch
new file mode 100644
index 0000000000..66622a9c8e
--- /dev/null
+++ b/multimedia/cinelerra/patches/05-cinelerra-std_and_str_h.patch
@@ -0,0 +1,81 @@
+Include required headers for free(), memcpy(), strcpy(), bcopy(), and more
+Thanks to Martin von Gagern for reporting and initial patch
+See, http://bugs.gentoo.org/show_bug.cgi?id=465478
+
+--- a/cinelerra/vdevicebuz.C
++++ b/cinelerra/vdevicebuz.C
+@@ -49,6 +49,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <unistd.h>
++#include <string.h>
++#include <strings.h>
+
+ #define BASE_VIDIOCPRIVATE 192
+
+--- a/cinelerra/videodevice.C
++++ b/cinelerra/videodevice.C
+@@ -53,6 +53,7 @@
+
+ #include <unistd.h>
+ #include <fcntl.h>
++#include <string.h>
+
+ KeepaliveThread::KeepaliveThread(VideoDevice *device)
+ : Thread()
+--- a/libmpeg3/audio/ac3.c
++++ b/libmpeg3/audio/ac3.c
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdint.h>
+ #include <stdio.h>
+
+--- a/libmpeg3/audio/layer3.c
++++ b/libmpeg3/audio/layer3.c
+@@ -4,6 +4,7 @@
+ #include "tables.h"
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ struct gr_info_s
+--- a/mplexlo/mplex.c
++++ b/mplexlo/mplex.c
+@@ -1,6 +1,6 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+-
++#include <string.h>
+
+ #include "libmpeg3.h"
+ #include "mpeg3protos.h"
+--- a/quicktime/graphics.c
++++ b/quicktime/graphics.c
+@@ -1,5 +1,6 @@
+ #include "graphics.h"
+
++#include <stdlib.h>
+ #include <string.h>
+
+ /* Graphics acceleration routines */
+--- a/quicktime/libmjpeg.c
++++ b/quicktime/libmjpeg.c
+@@ -17,6 +17,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "colormodels.h"
+ #include "libmjpeg.h"
+
+--- a/quicktime/qtpng.c
++++ b/quicktime/qtpng.c
+@@ -1,6 +1,7 @@
+ #include "colormodels.h"
+ #include "funcprotos.h"
+ #include <png.h>
++#include <string.h>
+ #include "quicktime.h"
+ #include "qtpng.h"
+
diff --git a/multimedia/cinelerra/patches/06-cinelerra-libav9.patch b/multimedia/cinelerra/patches/06-cinelerra-libav9.patch
new file mode 100644
index 0000000000..47a4d6f231
--- /dev/null
+++ b/multimedia/cinelerra/patches/06-cinelerra-libav9.patch
@@ -0,0 +1,93 @@
+diff -urN cinelerra-20120707/cinelerra/ffmpeg.C /tmp/cinelerra-20120707/cinelerra/ffmpeg.C
+--- cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:43.632978553 +0200
++++ /tmp/cinelerra-20120707/cinelerra/ffmpeg.C 2013-06-22 18:07:21.668979334 +0200
+@@ -32,9 +32,9 @@
+ return 1;
+ }
+
+- context = avcodec_alloc_context();
++ context = avcodec_alloc_context3(NULL);
+
+- if (avcodec_open(context, codec)) {
++ if (avcodec_open2(context, codec, NULL)) {
+ printf("FFMPEG::init avcodec_open() failed\n");
+ }
+
+diff -urN cinelerra-20120707/cinelerra/fileac3.C /tmp/cinelerra-20120707/cinelerra/fileac3.C
+--- cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:43.632978553 +0200
++++ /tmp/cinelerra-20120707/cinelerra/fileac3.C 2013-06-22 18:07:21.668979334 +0200
+@@ -91,11 +91,11 @@
+ eprintf("codec not found.\n");
+ return 1;
+ }
+- codec_context = avcodec_alloc_context();
++ codec_context = avcodec_alloc_context3(NULL);
+ codec_context->bit_rate = asset->ac3_bitrate * 1000;
+ codec_context->sample_rate = asset->sample_rate;
+ codec_context->channels = asset->channels;
+- if(avcodec_open(codec_context, codec))
++ if(avcodec_open2(codec_context, codec, NULL))
+ {
+ eprintf("failed to open codec.\n");
+ return 1;
+diff -urN cinelerra-20120707/quicktime/mpeg4.c /tmp/cinelerra-20120707/quicktime/mpeg4.c
+--- cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:43.633978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/mpeg4.c 2013-06-22 18:07:21.690979334 +0200
+@@ -642,7 +642,7 @@
+ return 1;
+ }
+
+- codec->encoder_context[current_field] = avcodec_alloc_context();
++ codec->encoder_context[current_field] = avcodec_alloc_context3(NULL);
+ AVCodecContext *context = codec->encoder_context[current_field];
+
+ context->width = width_i;
+@@ -676,8 +676,6 @@
+ context->error_resilience = FF_ER_CAREFUL;
+ #elif LIBAVCODEC_VERSION_INT < ((54<<16)+(0<<8)+0)
+ context->error_recognition = FF_ER_CAREFUL;
+-#else
+- context->err_recognition |= AV_EF_CAREFUL;
+ #endif
+ context->error_concealment = 3;
+ context->frame_skip_cmp = FF_CMP_DCTMAX;
+diff -urN cinelerra-20120707/quicktime/qtffmpeg.c /tmp/cinelerra-20120707/quicktime/qtffmpeg.c
+--- cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:43.633978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/qtffmpeg.c 2013-06-22 18:07:21.690979334 +0200
+@@ -67,7 +67,7 @@
+ return 0;
+ }
+
+- AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context();
++ AVCodecContext *context = ptr->decoder_context[i] = avcodec_alloc_context3(NULL);
+ static char fake_data[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ context->width = ptr->width_i;
+ context->height = ptr->height_i;
+@@ -93,8 +93,8 @@
+ {
+ context->thread_count = cpus;
+ }
+- if(avcodec_open(context,
+- ptr->decoder[i]) < 0)
++ if(avcodec_open2(context,
++ ptr->decoder[i], NULL) < 0)
+ {
+ printf("quicktime_new_ffmpeg: avcodec_open failed.\n");
+ quicktime_delete_ffmpeg(ptr);
+diff -urN cinelerra-20120707/quicktime/wma.c /tmp/cinelerra-20120707/quicktime/wma.c
+--- cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:43.634978553 +0200
++++ /tmp/cinelerra-20120707/quicktime/wma.c 2013-06-22 18:07:21.690979334 +0200
+@@ -76,10 +76,10 @@
+ printf("init_decode: avcodec_find_decoder returned NULL.\n");
+ return 1;
+ }
+- codec->decoder_context = avcodec_alloc_context();
++ codec->decoder_context = avcodec_alloc_context3(NULL);
+ codec->decoder_context->sample_rate = trak->mdia.minf.stbl.stsd.table[0].sample_rate;
+ codec->decoder_context->channels = track_map->channels;
+- if(avcodec_open(codec->decoder_context, codec->decoder) < 0)
++ if(avcodec_open2(codec->decoder_context, codec->decoder, NULL) < 0)
+ {
+ printf("init_decode: avcodec_open failed.\n");
+ return 1;
+
diff --git a/multimedia/cinelerra/patches/07-cinelerra-ffmpeg2.patch b/multimedia/cinelerra/patches/07-cinelerra-ffmpeg2.patch
new file mode 100644
index 0000000000..eb172d1ce4
--- /dev/null
+++ b/multimedia/cinelerra/patches/07-cinelerra-ffmpeg2.patch
@@ -0,0 +1,218 @@
+https://bugs.gentoo.org/show_bug.cgi?id=479394
+By Helmut Jarausch
+
+--- a/cinelerra/ffmpeg.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/cinelerra/ffmpeg.h 2013-08-01 12:58:12.342474136 +0200
+@@ -26,7 +26,7 @@
+ static int convert_cmodel_transfer(VFrame *frame_in,VFrame *frame_out);
+ static int init_picture_from_frame(AVPicture *picture, VFrame *frame);
+
+- static CodecID codec_id(char *codec_string);
++ static AVCodecID codec_id(char *codec_string);
+
+ private:
+ static PixelFormat color_model_to_pix_fmt(int color_model);
+--- a/cinelerra/ffmpeg.C.ORIG 2013-08-01 11:24:43.794419246 +0200
++++ a/cinelerra/ffmpeg.C 2013-08-01 12:57:48.121473899 +0200
+@@ -25,7 +25,7 @@
+
+ avcodec_register_all();
+
+- CodecID id = codec_id(codec_string);
++ AVCodecID id = codec_id(codec_string);
+ codec = avcodec_find_decoder(id);
+ if (codec == NULL) {
+ printf("FFMPEG::init no decoder for '%s'", codec_string);
+@@ -51,7 +51,7 @@
+ }
+
+
+-CodecID FFMPEG::codec_id(char *codec_string) {
++AVCodecID FFMPEG::codec_id(char *codec_string) {
+ #define CODEC_IS(x) (! strncmp(codec_string, x, 4))
+
+ if (CODEC_IS(QUICKTIME_DV) ||
+--- a/quicktime/ffmpeg/ffmpeg.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/ffmpeg.c 2013-08-01 12:57:59.025474005 +0200
+@@ -2663,7 +2663,7 @@
+ return 0;
+ }
+
+-static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
++static enum AVCodecID find_codec_or_die(const char *name, int type, int encoder)
+ {
+ const char *codec_string = encoder ? "encoder" : "decoder";
+ AVCodec *codec;
+--- a/quicktime/ffmpeg/libavformat/electronicarts.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/electronicarts.c 2013-08-01 13:00:57.855475755 +0200
+@@ -49,11 +49,11 @@
+ typedef struct EaDemuxContext {
+ int big_endian;
+
+- enum CodecID video_codec;
++ enum AVCodecID video_codec;
+ AVRational time_base;
+ int video_stream_index;
+
+- enum CodecID audio_codec;
++ enum AVCodecID audio_codec;
+ int audio_stream_index;
+ int audio_frame_counter;
+
+--- a/quicktime/ffmpeg/libavformat/img2.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/img2.c 2013-08-01 12:59:21.408474812 +0200
+@@ -34,7 +34,7 @@
+ } VideoData;
+
+ typedef struct {
+- enum CodecID id;
++ enum AVCodecID id;
+ const char *str;
+ } IdStrMap;
+
+@@ -97,7 +97,7 @@
+ }
+ return -1;
+ }
+-static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
++static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
+ {
+ str= strrchr(str, '.');
+ if(!str) return CODEC_ID_NONE;
+@@ -175,7 +175,7 @@
+ return 0;
+ }
+
+-enum CodecID av_guess_image2_codec(const char *filename){
++enum AVCodecID av_guess_image2_codec(const char *filename){
+ return av_str2id(img_tags, filename);
+ }
+
+--- a/quicktime/ffmpeg/libavformat/matroskadec.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/matroskadec.c 2013-08-01 12:59:57.556475165 +0200
+@@ -2476,7 +2476,7 @@
+ AVStream *st;
+
+ for (i = 0; i < matroska->num_tracks; i++) {
+- enum CodecID codec_id = CODEC_ID_NONE;
++ enum AVCodecID codec_id = CODEC_ID_NONE;
+ uint8_t *extradata = NULL;
+ int extradata_size = 0;
+ int extradata_offset = 0;
+@@ -2495,7 +2495,7 @@
+ }
+ }
+
+- /* Set the FourCC from the CodecID. */
++ /* Set the FourCC from the AVCodecID. */
+ /* This is the MS compatibility mode which stores a
+ * BITMAPINFOHEADER in the CodecPrivate. */
+ if (!strcmp(track->codec_id,
+@@ -2600,7 +2600,7 @@
+
+ if (codec_id == CODEC_ID_NONE) {
+ av_log(matroska->ctx, AV_LOG_INFO,
+- "Unknown/unsupported CodecID %s.\n",
++ "Unknown/unsupported AVCodecID %s.\n",
+ track->codec_id);
+ }
+
+--- a/quicktime/ffmpeg/libavformat/matroska.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/matroska.h 2013-08-01 13:00:22.218475407 +0200
+@@ -220,12 +220,12 @@
+
+ typedef struct CodecTags{
+ char str[16];
+- enum CodecID id;
++ enum AVCodecID id;
+ }CodecTags;
+
+ typedef struct CodecMime{
+ char str[32];
+- enum CodecID id;
++ enum AVCodecID id;
+ }CodecMime;
+
+ #define MATROSKA_CODEC_ID_VIDEO_VFW_FOURCC "V_MS/VFW/FOURCC"
+--- a/quicktime/ffmpeg/libavformat/mov.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/mov.c 2013-08-01 12:59:33.935474934 +0200
+@@ -678,7 +678,7 @@
+
+ for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
+ //Parsing Sample description table
+- enum CodecID id;
++ enum AVCodecID id;
+ int dref_id;
+ MOV_atom_t a = { 0, 0, 0 };
+ offset_t start_pos = url_ftell(pb);
+--- a/quicktime/ffmpeg/libavformat/mxf.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/mxf.c 2013-08-01 12:59:12.025474720 +0200
+@@ -157,7 +157,7 @@
+ typedef struct {
+ UID uid;
+ unsigned matching_len;
+- enum CodecID id;
++ enum AVCodecID id;
+ } MXFCodecUL;
+
+ typedef struct {
+--- a/quicktime/ffmpeg/libavformat/riff.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/riff.h 2013-08-01 12:59:45.950475052 +0200
+@@ -48,7 +48,7 @@
+ extern const AVCodecTag codec_wav_tags[];
+
+ unsigned int codec_get_tag(const AVCodecTag *tags, int id);
+-enum CodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
++enum AVCodecID codec_get_id(const AVCodecTag *tags, unsigned int tag);
+ void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
+
+ #endif /* FFMPEG_RIFF_H */
+--- a/quicktime/ffmpeg/libavformat/rtp.c.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/rtp.c 2013-08-01 12:59:01.778474619 +0200
+@@ -40,7 +40,7 @@
+ int pt;
+ const char enc_name[6];
+ enum CodecType codec_type;
+- enum CodecID codec_id;
++ enum AVCodecID codec_id;
+ int clock_rate;
+ int audio_channels;
+ } AVRtpPayloadTypes[]=
+@@ -120,7 +120,7 @@
+ return "";
+ }
+
+-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
+ {
+ int i;
+
+--- a/quicktime/ffmpeg/libavformat/rtp_internal.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/ffmpeg/libavformat/rtp_internal.h 2013-08-01 13:00:09.147475279 +0200
+@@ -61,7 +61,7 @@
+ // fields from AVRtpDynamicPayloadType_s
+ const char enc_name[50]; /* XXX: still why 50 ? ;-) */
+ enum CodecType codec_type;
+- enum CodecID codec_id;
++ enum AVCodecID codec_id;
+
+ // may be null
+ int (*parse_sdp_a_line) (AVStream * stream,
+@@ -123,7 +123,7 @@
+
+ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
+ const char *ff_rtp_enc_name(int payload_type);
+-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
++enum AVCodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
+
+ void av_register_rtp_dynamic_payload_handlers(void);
+
+--- a/quicktime/wma.h.ORIG 2012-07-06 22:40:26.000000000 +0200
++++ a/quicktime/wma.h 2013-08-01 13:11:46.431482103 +0200
+@@ -3,5 +3,6 @@
+
+ extern void quicktime_init_codec_wmav1(quicktime_audio_map_t *);
+ extern void quicktime_init_codec_wmav2(quicktime_audio_map_t *);
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+
+ #endif