diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-07-04 15:36:39 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-07-04 15:36:39 +0200 |
commit | 9c387686faaecae77027f0df541ddaf66fb78897 (patch) | |
tree | eeaacf89ea5b90ba2b00f7b893100df7eb1d69da | |
parent | 53d779e680b56506f5e882fe777206ef45e0ff79 (diff) | |
download | xine-lib-9c387686faaecae77027f0df541ddaf66fb78897.tar.gz xine-lib-9c387686faaecae77027f0df541ddaf66fb78897.tar.bz2 |
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
-rw-r--r-- | src/xine-engine/buffer.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 <string.h> #include <stdio.h> #include <pthread.h> #include <sys/types.h> @@ -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 |