Commit 326e9eaa authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

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

Originally committed as revision 18160 to svn://
parent 14489074
......@@ -507,20 +507,14 @@ static enum PixelFormat avcodec_get_pix_fmt_internal(const char *name)
enum PixelFormat avcodec_get_pix_fmt(const char *name)
# define NE "be"
# define NE "le"
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment