Mercurial > libavcodec.hg
changeset 9242:3153dcc9f8d0 libavcodec
Factorize: use the X_NE() macro in avcodec_get_pix_fmt().
author | stefano |
---|---|
date | Sun, 22 Mar 2009 22:13:10 +0000 |
parents | 4f827ca90571 |
children | c09443000c4b |
files | imgconvert.c |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/imgconvert.c Sun Mar 22 22:12:03 2009 +0000 +++ b/imgconvert.c Sun Mar 22 22:13:10 2009 +0000 @@ -507,20 +507,14 @@ 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)