diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | autogen.sh | 4 | ||||
-rw-r--r-- | m4/decoders.m4 | 12 | ||||
-rw-r--r-- | src/combined/ffmpeg/ff_video_decoder.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 3 | ||||
-rw-r--r-- | src/video_dec/libmpeg2new/Makefile.am | 6 | ||||
-rw-r--r-- | src/video_dec/libmpeg2new/libmpeg2/Makefile.am | 6 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 16 |
8 files changed, 45 insertions, 12 deletions
@@ -69,12 +69,14 @@ xine-lib (1.1.90) (Unreleased) colour controls, zooming, colour keying. xine-lib (1.1.17) 2009-??-?? - * Enable libmpeg2new. This is not yet production code; the old mpeg2 - decoder remains the default. + * Enable libmpeg2new (if configured with --enable-libmpeg2new). + This is not yet production code; the old mpeg2 decoder remains the default. * Add support for OpenBSD. * Fix a build failure on *BSD due to some rather useful GNUisms. * Protect audio loop so it cannot write to a paused device (fix pause/resume freeze with pulseaudio). + * Fix build with libavutil >= 50.0.0. + * Fix segfaults when playing VCDs. xine-lib (1.1.16.2) 2009-02-10 * Build fixes related to ImageMagick 6.4 & later. diff --git a/autogen.sh b/autogen.sh index 1d74b5a8b..a48dd5afa 100755 --- a/autogen.sh +++ b/autogen.sh @@ -290,15 +290,15 @@ case "$1" in run_libtoolize ;; noconfig) - run_aclocal run_libtoolize + run_aclocal run_autoheader run_automake run_autoconf ;; *) - run_aclocal run_libtoolize + run_aclocal run_autoheader run_automake run_autoconf diff --git a/m4/decoders.m4 b/m4/decoders.m4 index fd7580a07..9150adda0 100644 --- a/m4/decoders.m4 +++ b/m4/decoders.m4 @@ -93,7 +93,11 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ dnl Check presence of ffmpeg/avutil.h to see if it's old or new dnl style for headers. The new style would be preferred actually... AC_CHECK_HEADERS([ffmpeg/avutil.h]) - + AC_CHECK_HEADERS([libavutil/avutil.h]) + if test "$ac_cv_header_ffmpeg_avutil_h" = "yes" && test "$ac_cv_header_libavutil_avutil_h" = "yes"; then + AC_MSG_ERROR([old & new ffmpeg headers found - you need to clean up!]) + fi + dnl gdk-pixbuf (optional; enabled by default) AC_ARG_ENABLE([gdkpixbuf], [AS_HELP_STRING([--enable-gdkpixbuf], [Enable GdkPixbuf support (default: enabled)])], @@ -286,6 +290,12 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [ AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"]) + dnl libmpeg2new (optional; disabled by default) + AC_ARG_ENABLE([libmpeg2new], + AS_HELP_STRING([--enable-libmpeg2new], [build the newer MPEG2 decoder (buggy)])) + AM_CONDITIONAL([ENABLE_MPEG2NEW], [test "x$enable_libmpeg2new" = "xyes"]) + + dnl libmpcdec (optional; enabled by default; external version allowed) AC_ARG_ENABLE([musepack], [AS_HELP_STRING([--enable-musepack], [Enable support for Musepack decoding (default: enabled, internal: use external copy)])]) diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 19e10cbc9..d7e068812 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -579,7 +579,7 @@ static void ff_convert_frame(ff_video_decoder_t *this, vo_frame_t *img) { img->width, this->bih.biHeight); - } else if (this->context->pix_fmt == PIX_FMT_RGBA32) { + } else if (this->context->pix_fmt == PIX_FMT_RGB32) { int x, plane_ptr = 0; uint32_t *argb_pixels; @@ -1287,7 +1287,7 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { /* initialize the colorspace converter */ if (!this->cs_convert_init) { - if ((this->context->pix_fmt == PIX_FMT_RGBA32) || + if ((this->context->pix_fmt == PIX_FMT_RGB32) || (this->context->pix_fmt == PIX_FMT_RGB565) || (this->context->pix_fmt == PIX_FMT_RGB555) || (this->context->pix_fmt == PIX_FMT_BGR24) || diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index db98a34cc..d910894d6 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.c @@ -1422,7 +1422,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str } input->seek(input, 0, SEEK_SET); - if (input->read(input, this->scratch, this->blocksize) == this->blocksize) { + memset (this->scratch, 255, 5); /* result of input->read() won't matter */ + if (input->read(input, this->scratch, this->blocksize)) { lprintf("open_plugin:read worked\n"); if (this->scratch[0] || this->scratch[1] diff --git a/src/video_dec/libmpeg2new/Makefile.am b/src/video_dec/libmpeg2new/Makefile.am index f79b8aba9..3f704bad6 100644 --- a/src/video_dec/libmpeg2new/Makefile.am +++ b/src/video_dec/libmpeg2new/Makefile.am @@ -6,7 +6,11 @@ AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = include libmpeg2 -xineplug_LTLIBRARIES = xineplug_decode_mpeg2new.la +if ENABLE_MPEG2NEW +mpeg2new_module = xineplug_decode_mpeg2new.la +endif + +xineplug_LTLIBRARIES = $(mpeg2new_module) xineplug_decode_mpeg2new_la_SOURCES = \ xine_mpeg2new_decoder.c diff --git a/src/video_dec/libmpeg2new/libmpeg2/Makefile.am b/src/video_dec/libmpeg2new/libmpeg2/Makefile.am index f916dacd6..7a49f8726 100644 --- a/src/video_dec/libmpeg2new/libmpeg2/Makefile.am +++ b/src/video_dec/libmpeg2new/libmpeg2/Makefile.am @@ -2,7 +2,11 @@ include $(top_srcdir)/misc/Makefile.common AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) -noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la +if ENABLE_MPEG2NEW +mpeg2new_libs = libmpeg2.la libmpeg2arch.la +endif + +noinst_LTLIBRARIES = $(mpeg2new_libs) libmpeg2_la_SOURCES = alloc.c header.c decode.c slice.c motion_comp.c idct.c libmpeg2_la_LIBADD = libmpeg2arch.la diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 348431114..2f29f92ea 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -219,6 +219,7 @@ typedef struct { int num_driver_actions; /* number of threads, that wish to call * functions needing driver_lock */ pthread_mutex_t driver_action_lock; /* protects num_driver_actions */ + pthread_cond_t driver_action_cond; /* informs about num_driver_actions-- */ metronom_clock_t *clock; xine_t *xine; @@ -1285,8 +1286,15 @@ static void *ao_loop (void *this_gen) { /* Give other threads a chance to use functions which require this->driver_lock to * be available. This is needed when using NPTL on Linux (and probably PThreads * on Solaris as well). */ - if (this->num_driver_actions > 0) - sched_yield(); + if (this->num_driver_actions > 0) { + /* calling sched_yield() is not sufficient on multicore systems */ + /* sched_yield(); */ + /* instead wait for the other thread to acquire this->driver_lock */ + pthread_mutex_lock(&this->driver_action_lock); + if (this->num_driver_actions > 0) + pthread_cond_wait(&this->driver_action_cond, &this->driver_action_lock); + pthread_mutex_unlock(&this->driver_action_lock); + } } if (in_buf) { @@ -1477,6 +1485,8 @@ static inline void dec_num_driver_actions(aos_t *this) { pthread_mutex_lock(&this->driver_action_lock); this->num_driver_actions--; + /* indicate the change to ao_loop() */ + pthread_cond_broadcast(&this->driver_action_cond); pthread_mutex_unlock(&this->driver_action_lock); } @@ -1679,6 +1689,7 @@ static void ao_exit(xine_audio_port_t *this_gen) { } pthread_mutex_destroy(&this->driver_lock); + pthread_cond_destroy(&this->driver_action_cond); pthread_mutex_destroy(&this->driver_action_lock); pthread_mutex_destroy(&this->streams_lock); xine_list_delete(this->streams); @@ -2083,6 +2094,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver, pthread_mutex_init( &this->streams_lock, NULL ); pthread_mutex_init( &this->driver_lock, &attr ); pthread_mutex_init( &this->driver_action_lock, NULL ); + pthread_cond_init( &this->driver_action_cond, NULL ); this->ao.open = ao_open; this->ao.get_buffer = ao_get_buffer; |