From 9c387686faaecae77027f0df541ddaf66fb78897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Fri, 4 Jul 2008 15:36:39 +0200 Subject: Add a _x_is_fourcc() inline function to wrap around memcmp(). This should be simpler and faster for the compiler to optimise rather than a _X_[BLM]E_32 macro and a comparison. --HG-- extra : transplant_source : %C7%1C%16%17N%3Bh%9B%EB%AA%00%A9%F1%15%C8%CB%8A%99%EE%7D --- src/xine-engine/buffer.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 5e43028e8..34e6f7c1d 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -39,6 +39,7 @@ extern "C" { #include "config.h" #endif +#include #include #include #include @@ -672,6 +673,10 @@ void _x_bmiheader_le2me( xine_bmiheader *bih ) XINE_PROTECTED; /* convert xine_waveformatex struct from little endian */ void _x_waveformatex_le2me( xine_waveformatex *wavex ) XINE_PROTECTED; +static inline _x_is_fourcc(void *ptr, void *tag) { + return memcmp(ptr, tag, 4) == 0; +} + #ifdef __cplusplus } #endif -- cgit v1.2.3