rpms/xmms-wma/devel xmms-wma-1.0.5-build.patch, 1.1,
1.2 xmms-wma.spec, 1.3, 1.4
Orcan Ogetbil
oget at rpmfusion.org
Sun Feb 22 00:18:11 CET 2009
Author: oget
Update of /cvs/free/rpms/xmms-wma/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv6818
Modified Files:
xmms-wma-1.0.5-build.patch xmms-wma.spec
Log Message:
Trying to fix the segfault by using global ffmpeg
xmms-wma-1.0.5-build.patch:
Index: xmms-wma-1.0.5-build.patch
===================================================================
RCS file: /cvs/free/rpms/xmms-wma/devel/xmms-wma-1.0.5-build.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- xmms-wma-1.0.5-build.patch 18 Oct 2008 14:10:36 -0000 1.1
+++ xmms-wma-1.0.5-build.patch 21 Feb 2009 23:18:11 -0000 1.2
@@ -1,6 +1,6 @@
-diff -Naupr xmms-wma-1.0.5.orig/ffmpeg-strip-wma/config.h xmms-wma-1.0.5/ffmpeg-strip-wma/config.h
---- xmms-wma-1.0.5.orig/ffmpeg-strip-wma/config.h 2004-02-19 01:08:56.000000000 +0100
-+++ xmms-wma-1.0.5/ffmpeg-strip-wma/config.h 2005-12-02 17:09:41.000000000 +0100
+diff -rupN xmms-wma-1.0.5.old/ffmpeg-strip-wma/config.h xmms-wma-1.0.5/ffmpeg-strip-wma/config.h
+--- xmms-wma-1.0.5.old/ffmpeg-strip-wma/config.h 2004-02-18 19:08:56.000000000 -0500
++++ xmms-wma-1.0.5/ffmpeg-strip-wma/config.h 2009-02-21 18:11:59.000000000 -0500
@@ -1,8 +1,8 @@
/* Automatically generated by configure - do not modify */
-#define ARCH_X86 1
@@ -12,9 +12,9 @@
#define HAVE_BUILTIN_VECTOR 1
#define HAVE_LOCALTIME_R 1
#define HAVE_LRINTF 1
-diff -Naupr xmms-wma-1.0.5.orig/ffmpeg-strip-wma/Makefile xmms-wma-1.0.5/ffmpeg-strip-wma/Makefile
---- xmms-wma-1.0.5.orig/ffmpeg-strip-wma/Makefile 2004-02-23 01:47:06.000000000 +0100
-+++ xmms-wma-1.0.5/ffmpeg-strip-wma/Makefile 2005-12-02 17:12:19.000000000 +0100
+diff -rupN xmms-wma-1.0.5.old/ffmpeg-strip-wma/Makefile xmms-wma-1.0.5/ffmpeg-strip-wma/Makefile
+--- xmms-wma-1.0.5.old/ffmpeg-strip-wma/Makefile 2004-02-22 19:47:06.000000000 -0500
++++ xmms-wma-1.0.5/ffmpeg-strip-wma/Makefile 2009-02-21 18:11:59.000000000 -0500
@@ -6,7 +6,7 @@
include config.mak
@@ -24,9 +24,9 @@
OBJS= common.o utils.o mem.o allcodecs.o futils.o cutils.o os_support.o allformats.o parser.o \
avio.o aviobuf.o file.o simple_idct.o dsputil.o fft.o mdct.o asf.o
-diff -Naupr xmms-wma-1.0.5.orig/Makefile xmms-wma-1.0.5/Makefile
---- xmms-wma-1.0.5.orig/Makefile 2004-03-03 15:47:58.000000000 +0100
-+++ xmms-wma-1.0.5/Makefile 2005-12-02 17:10:48.000000000 +0100
+diff -rupN xmms-wma-1.0.5.old/Makefile xmms-wma-1.0.5/Makefile
+--- xmms-wma-1.0.5.old/Makefile 2004-03-03 09:47:58.000000000 -0500
++++ xmms-wma-1.0.5/Makefile 2009-02-21 18:12:18.000000000 -0500
@@ -1,6 +1,6 @@
.PHONY: all install install-home uninstall uninstall-home clean
@@ -35,17 +35,42 @@
INSTALL_DIR_HOME := ~/.xmms/Plugins/Input
export PLUGIN_FILE := libwma.so
-@@ -13,7 +13,6 @@ export DEPS := $(SOURCES:%.c=$(DEPDIR)/%
+@@ -10,13 +10,26 @@ export SOURCES := xmms-wma.c iir.c
+ export OBJECTS := $(SOURCES:%.c=$(OBJDIR)/%.o)
+ export DEPS := $(SOURCES:%.c=$(DEPDIR)/%.d)
+
++CFLAGS += `pkg-config --cflags libavformat libavcodec`
++CFLAGS += `rpm -E %optflags`
++CFLAGS += -fPIC
++LIBS = `pkg-config --libs libavformat libavcodec`
++
++XMMS_CFLAGS = `xmms-config --cflags`
++XMMS_LIBS = `xmms-config --libs`
++XMMS_PLUGIN_FILE = libwma.so
++
++SOURCES = xmms-wma.c iir.c
++
all:
- @cd ffmpeg-strip-wma; make; cd ..
- @$(MAKE) --no-print-directory -f Makefile.inc
+- @cd ffmpeg-strip-wma; make; cd ..
+- @$(MAKE) --no-print-directory -f Makefile.inc
- @strip $(PLUGIN_FILE)
- @echo "The plug-in has been compiled. Run one of the following:"
- @echo "make install - for global (root) installation to $(INSTALL_DIR)"
- @echo "make install-home - for installation to home directory $(INSTALL_DIR_HOME)"
-diff -Naupr xmms-wma-1.0.5.orig/Makefile.inc xmms-wma-1.0.5/Makefile.inc
---- xmms-wma-1.0.5.orig/Makefile.inc 2005-09-05 14:48:20.000000000 +0200
-+++ xmms-wma-1.0.5/Makefile.inc 2005-12-02 17:16:01.000000000 +0100
+- @echo "The plug-in has been compiled. Run one of the following:"
+- @echo "make install - for global (root) installation to $(INSTALL_DIR)"
+- @echo "make install-home - for installation to home directory $(INSTALL_DIR_HOME)"
++ -mkdir obj-xmms
++
++ $(MAKE) -f Makefile.inc CFLAGS="$(XMMS_CFLAGS) $(CFLAGS)" \
++ OBJDIR=./obj-xmms DEPDIR=./obj-xmms LIBS="$(XMMS_LIBS) \
++ $(LIBS)" PLUGIN_FILE=$(XMMS_PLUGIN_FILE) \
++ OBJECTS="$(SOURCES:%.c=./obj-xmms/%.o)"
++
++ touch $@
+
+ install: all
+ cp -f $(PLUGIN_FILE) $(INSTALL_DIR)
+diff -rupN xmms-wma-1.0.5.old/Makefile.inc xmms-wma-1.0.5/Makefile.inc
+--- xmms-wma-1.0.5.old/Makefile.inc 2005-09-05 08:48:20.000000000 -0400
++++ xmms-wma-1.0.5/Makefile.inc 2009-02-21 18:11:59.000000000 -0500
@@ -7,7 +7,7 @@ CFLAGS += `xmms-config --cflags`
LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma
@@ -55,3 +80,66 @@
$(OBJDIR)/%.o: %.c
$(CC) -c -o $@ $(CFLAGS) $<
+diff -rupN xmms-wma-1.0.5.old/xmms-wma.c xmms-wma-1.0.5/xmms-wma.c
+--- xmms-wma-1.0.5.old/xmms-wma.c 2005-09-05 16:19:00.000000000 -0400
++++ xmms-wma-1.0.5/xmms-wma.c 2009-02-21 18:12:08.000000000 -0500
+@@ -42,8 +42,16 @@
+ #undef HAVE_AV_CONFIG_H
+ #endif
+
+-#include "avcodec.h"
+-#include "avformat.h"
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
++#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(38<<8)+0)
++#include <libavutil/fifo.h>
++#define FifoBuffer AVFifoBuffer
++#define fifo_init av_fifo_init
++#define fifo_free av_fifo_free
++#define fifo_read(a,b,c,d) av_fifo_read(a,b,c)
++#define fifo_write(a,b,c,d) av_fifo_write(a,b,c)
++#endif
+ #include "iir.h"
+
+ #define ABOUT_TXT "Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc at mail.ru).\n \
+@@ -379,7 +387,7 @@ static void *wma_play_loop(void *arg)
+
+ if(wma_seekpos != -1)
+ {
+- av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL);
++ av_seek_frame(ic, wma_idx, wma_seekpos * 1000000LL,0 );
+ wma_ip.output->flush(wma_seekpos * 1000);
+ wma_seekpos = -1;
+ }
+@@ -427,9 +435,11 @@ static void wma_play_file(char *filename
+ #endif
+
+ for(wma_idx = 0; wma_idx < ic->nb_streams; wma_idx++) {
+- c = &ic->streams[wma_idx]->codec;
++ c = ic->streams[wma_idx]->codec;
+ if(c->codec_type == CODEC_TYPE_AUDIO) break;
+ }
++ if(!c || c->codec_type != CODEC_TYPE_AUDIO)
++ return;
+
+ av_find_stream_info(ic);
+
+@@ -459,7 +469,8 @@ static void wma_stop(void)
+ {
+ wma_decode = 0;
+ if(wma_pause) wma_do_pause(0);
+- pthread_join(wma_decode_thread, NULL);
++ if(wma_decode_thread)
++ pthread_join(wma_decode_thread, NULL);
+ wma_ip.output->close_audio();
+ }
+
+@@ -482,7 +493,7 @@ static void wma_file_info_box (char *fil
+ #endif
+
+ for(i = 0; i < in->nb_streams; i++) {
+- s = &in->streams[i]->codec;
++ s = in->streams[i]->codec;
+ if(s->codec_type == CODEC_TYPE_AUDIO) break;
+ }
+
Index: xmms-wma.spec
===================================================================
RCS file: /cvs/free/rpms/xmms-wma/devel/xmms-wma.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xmms-wma.spec 18 Oct 2008 18:32:37 -0000 1.3
+++ xmms-wma.spec 21 Feb 2009 23:18:11 -0000 1.4
@@ -3,7 +3,7 @@
Summary: X MultiMedia System input plugin to play Windows Media Audio files
Name: xmms-wma
Version: 1.0.5
-Release: 5%{?dist}
+Release: 5.1%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://mcmcc.bat.ru/xmms-wma/
@@ -24,9 +24,9 @@
%setup -q
%patch -p1 -b .build
-
%build
-%{__make} %{?_smp_mflags} OPTFLAGS="%{optflags} -finline-functions"
+%{__make} %{?_smp_mflags} OPTFLAGS="%{optflags} -fPIC -fomit-frame-pointer -ffast-math"
+#OPTFLAGS="%{optflags} -finline-functions -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat -I/usr/include/ffmpeg/libavutil"
%install
More information about the rpmfusion-commits
mailing list