[FFmpeg-cvslog] r18160 - trunk/libavcodec/imgconvert.c

stefano subversion
Sun Mar 22 23:13:10 CET 2009


Author: stefano
Date: Sun Mar 22 23:13:10 2009
New Revision: 18160

Log:
Factorize: use the X_NE() macro in avcodec_get_pix_fmt().

Modified:
   trunk/libavcodec/imgconvert.c

Modified: trunk/libavcodec/imgconvert.c
==============================================================================
--- trunk/libavcodec/imgconvert.c	Sun Mar 22 23:12:03 2009	(r18159)
+++ trunk/libavcodec/imgconvert.c	Sun Mar 22 23:13:10 2009	(r18160)
@@ -507,20 +507,14 @@ static enum PixelFormat avcodec_get_pix_
 
 enum PixelFormat avcodec_get_pix_fmt(const char *name)
 {
-#ifdef WORDS_BIGENDIAN
-#   define NE "be"
-#else
-#   define NE "le"
-#endif
     enum PixelFormat pix_fmt = avcodec_get_pix_fmt_internal(name);
 
     if (pix_fmt == PIX_FMT_NONE) {
         char name2[32];
-        snprintf(name2, sizeof(name2), "%s%s", name, NE);
+        snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le"));
         pix_fmt = avcodec_get_pix_fmt_internal(name2);
     }
     return pix_fmt;
-#undef NE
 }
 
 void avcodec_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt)



More information about the ffmpeg-cvslog mailing list