aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2012-09-19 21:00:28 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-09-19 20:30:01 -0500
commit48f77cf574211851df8e08676f7e1b3f915195c7 (patch)
treec1148df59a10bbda77d9055d71aa4d14caa3a6ec
parent36f315e25c3a563664086e31108140bfc90625ce (diff)
multimedia/miro: Added a patch to build against the newer ffmpeg.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
-rw-r--r--multimedia/miro/ffmpeg-0.11.patch63
-rw-r--r--multimedia/miro/ffmpeg-api-change.patch57
-rw-r--r--multimedia/miro/miro.SlackBuild6
3 files changed, 66 insertions, 60 deletions
diff --git a/multimedia/miro/ffmpeg-0.11.patch b/multimedia/miro/ffmpeg-0.11.patch
new file mode 100644
index 0000000000000..8362308094a74
--- /dev/null
+++ b/multimedia/miro/ffmpeg-0.11.patch
@@ -0,0 +1,63 @@
+--- miro-5.0.1/linux/miro-segmenter.c~ 2012-07-06 14:33:24.618082171 +0000
++++ miro-5.0.1/linux/miro-segmenter.c 2012-07-06 15:10:19.564146117 +0000
+@@ -156,7 +156,7 @@
+ exit(1);
+ }
+
+- ret = av_open_input_file(&ic, input, ifmt, 0, NULL);
++ ret = avformat_open_input(&ic, input, ifmt, 0);
+ if (ret != 0) {
+ fprintf(stderr, "Could not open input file, make sure it is an mpegts file: %d\n", ret);
+ exit(1);
+@@ -215,12 +215,7 @@
+ }
+ }
+
+- if (av_set_parameters(oc, NULL) < 0) {
+- fprintf(stderr, "Invalid output format parameters\n");
+- exit(1);
+- }
+-
+- dump_format(oc, 0, input, 1);
++ av_dump_format(oc, 0, input, 1);
+
+ if (video_st) {
+ codec = avcodec_find_decoder(video_st->codec->codec_id);
+@@ -233,12 +228,12 @@
+ }
+ }
+
+- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ exit(1);
+ }
+
+- if (av_write_header(oc)) {
++ if (avformat_write_header(oc, NULL)) {
+ fprintf(stderr, "Could not write mpegts header to first output file\n");
+
+ exit(1);
+@@ -274,10 +269,10 @@
+ }
+
+ if (segment_time - prev_segment_time >= segment_duration) {
+- put_flush_packet(oc->pb);
+- url_fclose(oc->pb);
++ avio_flush(oc->pb);
++ avio_close(oc->pb);
+
+- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
++ if (avio_open(&oc->pb, output_filename, AVIO_FLAG_WRITE) < 0) {
+ fprintf(stderr, "Could not open '%s'\n", output_filename);
+ break;
+ }
+@@ -307,7 +302,7 @@
+ av_freep(&oc->streams[i]);
+ }
+
+- url_fclose(oc->pb);
++ avio_close(oc->pb);
+ av_free(oc);
+
+ /* End-of-transcode marker. */
diff --git a/multimedia/miro/ffmpeg-api-change.patch b/multimedia/miro/ffmpeg-api-change.patch
deleted file mode 100644
index c281635685004..0000000000000
--- a/multimedia/miro/ffmpeg-api-change.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Naur miro-4.0.4.orig/linux/miro-segmenter.c miro-4.0.4/linux/miro-segmenter.c
---- miro-4.0.4.orig/linux/miro-segmenter.c 2011-12-22 14:45:47.000000000 +0000
-+++ miro-4.0.4/linux/miro-segmenter.c 2011-12-28 22:22:48.550499302 +0000
-@@ -220,7 +220,11 @@
- exit(1);
- }
-
-+#if LIBAVFORMAT_VERSION_MAJOR > 52
-+ av_dump_format(oc, 0, input, 1);
-+#else
- dump_format(oc, 0, input, 1);
-+#endif
-
- if (video_st) {
- codec = avcodec_find_decoder(video_st->codec->codec_id);
-@@ -233,7 +237,11 @@
- }
- }
-
-+#if LIBAVFORMAT_VERSION_MAJOR > 52
-+ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
-+#else
- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
-+#endif
- fprintf(stderr, "Could not open '%s'\n", output_filename);
- exit(1);
- }
-@@ -274,10 +282,17 @@
- }
-
- if (segment_time - prev_segment_time >= segment_duration) {
-+#if LIBAVFORMAT_VERSION_MAJOR > 52
-+ avio_flush(oc->pb);
-+ avio_close(oc->pb);
-+
-+ if (avio_open(&oc->pb, output_filename, URL_WRONLY) < 0) {
-+#else
- put_flush_packet(oc->pb);
- url_fclose(oc->pb);
-
- if (url_fopen(&oc->pb, output_filename, URL_WRONLY) < 0) {
-+#endif
- fprintf(stderr, "Could not open '%s'\n", output_filename);
- break;
- }
-@@ -307,7 +322,11 @@
- av_freep(&oc->streams[i]);
- }
-
-+#if LIBAVFORMAT_VERSION_MAJOR > 52
-+ avio_close(oc->pb);
-+#else
- url_fclose(oc->pb);
-+#endif
- av_free(oc);
-
- /* End-of-transcode marker. */
diff --git a/multimedia/miro/miro.SlackBuild b/multimedia/miro/miro.SlackBuild
index ade3bcf3656da..83a44b582c851 100644
--- a/multimedia/miro/miro.SlackBuild
+++ b/multimedia/miro/miro.SlackBuild
@@ -24,7 +24,7 @@
PRGNAM=miro
VERSION=${VERSION:-5.0.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -71,8 +71,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Patch to build against ffmpeg 0.6.x, 0.7.x and 0.8.x.
-patch -p1 < $CWD/ffmpeg-api-change.patch
+# Patch to build against ffmpeg 0.11.x
+patch -p1 < $CWD/ffmpeg-0.11.patch
# Patch to fix the gdb call from miro.
patch -p1 < $CWD/miro-gdb-fix.patch