--- xmms-wma.c.orig 2005-10-24 01:23:13.218835024 +0000 +++ xmms-wma.c 2005-10-24 01:28:17.917513784 +0000 @@ -42,8 +42,8 @@ #undef HAVE_AV_CONFIG_H #endif -#include "avcodec.h" -#include "avformat.h" +#include "ffmpeg/avcodec.h" +#include "ffmpeg/avformat.h" #include "iir.h" #define ABOUT_TXT "Copyright (C) 2004,2005 Mokrushin I.V. aka McMCC (mcmcc@mail.ru).\n \ @@ -379,7 +379,7 @@ 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; } @@ -431,6 +431,9 @@ if(c->codec_type == CODEC_TYPE_AUDIO) break; } + if(!c || c->codec_type != CODEC_TYPE_AUDIO) + return; + av_find_stream_info(ic); codec = avcodec_find_decoder(c->codec_id); @@ -459,7 +462,8 @@ { 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(); } --- Makefile.orig 2005-10-24 01:34:07.095430672 +0000 +++ Makefile 2005-10-24 01:35:00.225353696 +0000 @@ -11,7 +11,7 @@ export DEPS := $(SOURCES:%.c=$(DEPDIR)/%.d) all: - @cd ffmpeg-strip-wma; make; cd .. + #@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:" @@ -40,5 +40,5 @@ @echo "The plug-in has been uninstalled." clean: - cd ffmpeg-strip-wma; make clean; cd .. + #cd ffmpeg-strip-wma; make clean; cd .. rm -f $(OBJECTS) $(DEPS) --- Makefile.inc.orig 2005-10-24 01:36:18.429464864 +0000 +++ Makefile.inc 2005-10-24 01:37:25.107328288 +0000 @@ -1,16 +1,18 @@ CC := gcc -CFLAGS := -O2 -ffast-math -fomit-frame-pointer -fPIC -#CFLAGS := -Wall -g -O3 -CFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -CFLAGS += -I ffmpeg-strip-wma -CFLAGS += `xmms-config --cflags` -LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma +MYCFLAGS := $(CFLAGS) -fPIC +#MYCFLAGS := -Wall -g -O3 +MYCFLAGS += -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC +#MYCFLAGS += -I ffmpeg-strip-wma +MYCFLAGS += `xmms-config --cflags` +MYCFLAGS += -I/usr/include/ffmpeg +#LIBS := `xmms-config --libs` -L ffmpeg-strip-wma -lffwma +LIBS := `xmms-config --libs` -lavcodec -lavformat $(PLUGIN_FILE): $(OBJECTS) $(CC) -o $@ $^ $(LIBS) -shared $(OBJDIR)/%.o: %.c - $(CC) -c -o $@ $(CFLAGS) $< + $(CC) -c -o $@ $(MYCFLAGS) $< $(DEPDIR)/%.d: %.c $(CC) -MM $(CFLAGS) $< | sed "s/^$*\.o:/$(OBJDIR)\/$*\.o $(DEPDIR)\/$*\.d:/" > $@ --- wma123_examples/Makefile.orig 2005-10-24 01:38:23.246489792 +0000 +++ wma123_examples/Makefile 2005-10-24 01:38:57.836231352 +0000 @@ -1,7 +1,7 @@ -include ../ffmpeg-strip-wma/config.mak +#include ../ffmpeg-strip-wma/config.mak -INC=-I../ffmpeg-strip-wma -LIB=-L../ffmpeg-strip-wma +#INC=-I../ffmpeg-strip-wma +#LIB=-L../ffmpeg-strip-wma CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE all: artswma alsawma osswma