summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/Makefile.am2
-rw-r--r--src/demuxers/demux_mod.c2
-rw-r--r--src/input/Makefile.am1
-rw-r--r--src/video_out/video_out_vaapi.c25
-rw-r--r--src/xine-utils/memcpy.c1
5 files changed, 23 insertions, 8 deletions
diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am
index 32b5616f7..1f7948fdb 100644
--- a/src/demuxers/Makefile.am
+++ b/src/demuxers/Makefile.am
@@ -84,6 +84,8 @@ xineplug_dmx_qt_la_SOURCES = demux_qt.c
xineplug_dmx_qt_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(ZLIB_LIBS)
xineplug_dmx_qt_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS)
+# note: asfheader.c also used from ../input
+# is safe given same compiler options
xineplug_dmx_asf_la_SOURCES = demux_asf.c asfheader.c
xineplug_dmx_asf_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(LTLIBICONV)
xineplug_dmx_asf_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing
diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c
index 39becbac3..08ca877d0 100644
--- a/src/demuxers/demux_mod.c
+++ b/src/demuxers/demux_mod.c
@@ -46,7 +46,7 @@
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/demux.h>
-#include "modplug.h"
+#include <libmodplug/modplug.h>
#include "bswap.h"
#define MOD_SAMPLERATE 44100
diff --git a/src/input/Makefile.am b/src/input/Makefile.am
index 804b36352..3752d4c9b 100644
--- a/src/input/Makefile.am
+++ b/src/input/Makefile.am
@@ -103,6 +103,7 @@ xineplug_inp_dvd_la_CFLAGS = $(AM_CFLAGS) $(DVD_CFLAGS)
xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c
xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL)
+# note: compiling ../demuxers/asfheader.c here is safe given same compiler options
xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c ../demuxers/asfheader.c
xineplug_inp_mms_la_LIBADD = $(XINE_LIB) $(LTLIBICONV) $(PTHREAD_LIBS) $(LTLIBINTL)
diff --git a/src/video_out/video_out_vaapi.c b/src/video_out/video_out_vaapi.c
index ade498d3a..6f0b5c1b8 100644
--- a/src/video_out/video_out_vaapi.c
+++ b/src/video_out/video_out_vaapi.c
@@ -72,6 +72,12 @@
#include "accel_vaapi.h"
+#ifdef HAVE_FFMPEG_AVUTIL_H
+# include <mem.h>
+#else
+# include <libavutil/mem.h>
+#endif
+
#ifndef VA_SURFACE_ATTRIB_SETTABLE
#define vaCreateSurfaces(d, f, w, h, s, ns, a, na) \
vaCreateSurfaces(d, w, h, f, ns, s)
@@ -1637,7 +1643,7 @@ static void vaapi_property_callback (void *property_gen, xine_cfg_entry_t *entry
lprintf("vaapi_property_callback property=%d, value=%d\n", property->type, entry->num_value );
- VAStatus vaStatus = vaSetDisplayAttributes(va_context->va_display, &attr, 1);
+ /*VAStatus vaStatus = */ vaSetDisplayAttributes(va_context->va_display, &attr, 1);
//vaapi_check_status((vo_driver_t *)this, vaStatus, "vaSetDisplayAttributes()");
vaapi_show_display_props((vo_driver_t*)this);
@@ -1769,7 +1775,7 @@ static void vaapi_display_attribs(vo_driver_t *this_gen) {
static void vaapi_set_background_color(vo_driver_t *this_gen) {
vaapi_driver_t *this = (vaapi_driver_t *)this_gen;
ff_vaapi_context_t *va_context = this->va_context;
- VAStatus vaStatus;
+ //VAStatus vaStatus;
if(!va_context->valid_context)
return;
@@ -1780,7 +1786,7 @@ static void vaapi_set_background_color(vo_driver_t *this_gen) {
attr.type = VADisplayAttribBackgroundColor;
attr.value = 0x000000;
- vaStatus = vaSetDisplayAttributes(va_context->va_display, &attr, 1);
+ /*vaStatus =*/ vaSetDisplayAttributes(va_context->va_display, &attr, 1);
//vaapi_check_status(this_gen, vaStatus, "vaSetDisplayAttributes()");
}
@@ -3677,13 +3683,12 @@ static int vaapi_gui_data_exchange (vo_driver_t *this_gen,
return 0;
}
-static void vaapi_dispose (vo_driver_t *this_gen) {
+static void vaapi_dispose_locked (vo_driver_t *this_gen) {
vaapi_driver_t *this = (vaapi_driver_t *) this_gen;
ff_vaapi_context_t *va_context = this->va_context;
- lprintf("vaapi_dispose\n");
+ // vaapi_lock is locked at this point, either from vaapi_dispose or vaapi_open_plugin
- pthread_mutex_lock(&this->vaapi_lock);
DO_LOCKDISPLAY;
this->ovl_yuv2rgb->dispose(this->ovl_yuv2rgb);
@@ -3713,6 +3718,12 @@ static void vaapi_dispose (vo_driver_t *this_gen) {
free (this);
}
+static void vaapi_dispose (vo_driver_t *this_gen) {
+ lprintf("vaapi_dispose\n");
+ pthread_mutex_lock(&((vaapi_driver_t *)this_gen)->vaapi_lock);
+ vaapi_dispose_locked(this_gen);
+}
+
static void vaapi_vdr_osd_width_flag( void *this_gen, xine_cfg_entry_t *entry )
{
vaapi_driver_t *this = (vaapi_driver_t *) this_gen;
@@ -3971,7 +3982,7 @@ static vo_driver_t *vaapi_open_plugin (video_driver_class_t *class_gen, const vo
this->va_context->last_sub_image_fmt = 0;
if(vaapi_init_internal((vo_driver_t *)this, SW_CONTEXT_INIT_FORMAT, SW_WIDTH, SW_HEIGHT, 0) != VA_STATUS_SUCCESS) {
- vaapi_dispose((vo_driver_t *)this);
+ vaapi_dispose_locked((vo_driver_t *)this);
return NULL;
}
vaapi_close((vo_driver_t *)this);
diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c
index 6eda220ed..e00171e33 100644
--- a/src/xine-utils/memcpy.c
+++ b/src/xine-utils/memcpy.c
@@ -342,6 +342,7 @@ static void * avx_memcpy(void * to, const void * from, size_t len)
/* since movntq is weakly-ordered, a "sfence"
* is needed to become ordered again. */
__asm__ __volatile__ ("sfence":::"memory");
+ __asm__ __volatile__ ("vzeroupper");
}
/*
* Now do the tail of the block