Help further refactoring.
Originally committed as revision 24814 to svn://svn.ffmpeg.org/ffmpeg/trunk
| ... | ... |
@@ -37,11 +37,7 @@ |
| 37 | 37 |
/* XXX: we make the assumption that the soundcard accepts this format */ |
| 38 | 38 |
/* XXX: find better solution with "preinit" method, needed also in |
| 39 | 39 |
other formats */ |
| 40 |
-#if HAVE_BIGENDIAN |
|
| 41 |
-#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16BE |
|
| 42 |
-#else |
|
| 43 |
-#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16LE |
|
| 44 |
-#endif |
|
| 40 |
+#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) |
|
| 45 | 41 |
|
| 46 | 42 |
typedef struct {
|
| 47 | 43 |
snd_pcm_t *h; |
| ... | ... |
@@ -315,11 +315,7 @@ AVOutputFormat oss_muxer = {
|
| 315 | 315 |
/* XXX: we make the assumption that the soundcard accepts this format */ |
| 316 | 316 |
/* XXX: find better solution with "preinit" method, needed also in |
| 317 | 317 |
other formats */ |
| 318 |
-#if HAVE_BIGENDIAN |
|
| 319 |
- CODEC_ID_PCM_S16BE, |
|
| 320 |
-#else |
|
| 321 |
- CODEC_ID_PCM_S16LE, |
|
| 322 |
-#endif |
|
| 318 |
+ AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), |
|
| 323 | 319 |
CODEC_ID_NONE, |
| 324 | 320 |
audio_write_header, |
| 325 | 321 |
audio_write_packet, |
| ... | ... |
@@ -40,7 +40,7 @@ |
| 40 | 40 |
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) |
| 41 | 41 |
|
| 42 | 42 |
#define LIBAVUTIL_VERSION_MAJOR 50 |
| 43 |
-#define LIBAVUTIL_VERSION_MINOR 23 |
|
| 43 |
+#define LIBAVUTIL_VERSION_MINOR 24 |
|
| 44 | 44 |
#define LIBAVUTIL_VERSION_MICRO 0 |
| 45 | 45 |
|
| 46 | 46 |
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| ... | ... |
@@ -35,6 +35,13 @@ |
| 35 | 35 |
#include <stdlib.h> |
| 36 | 36 |
#include <string.h> |
| 37 | 37 |
#include "attributes.h" |
| 38 |
+#include "avconfig.h" |
|
| 39 |
+ |
|
| 40 |
+#if AV_HAVE_BIGENDIAN |
|
| 41 |
+# define AV_NE(be, le) be |
|
| 42 |
+#else |
|
| 43 |
+# define AV_NE(be, le) le |
|
| 44 |
+#endif |
|
| 38 | 45 |
|
| 39 | 46 |
//rounded division & shift |
| 40 | 47 |
#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) |