aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/pixdesc.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-07-24 23:17:17 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-08-04 12:55:07 +0100
commitd2962e9f89cca6ff40f0c9d5ffc9c4397b8b1b26 (patch)
treedb58a6aced1b2e24c59c1ca2cf973bcc6f776f36 /libavutil/pixdesc.c
parent5420099cab1e915b191cceccec4364f54cec6e52 (diff)
downloadffmpeg-d2962e9f89cca6ff40f0c9d5ffc9c4397b8b1b26.tar.gz
pixdesc: Support pixelformat aliases
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r--libavutil/pixdesc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index f2a3dd1a53..5443012539 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
+#include "avstring.h"
#include "common.h"
#include "pixfmt.h"
#include "pixdesc.h"
@@ -1507,7 +1508,8 @@ static enum AVPixelFormat get_pix_fmt_internal(const char *name)
for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++)
if (av_pix_fmt_descriptors[pix_fmt].name &&
- !strcmp(av_pix_fmt_descriptors[pix_fmt].name, name))
+ (!strcmp(av_pix_fmt_descriptors[pix_fmt].name, name) ||
+ av_match_name(name, av_pix_fmt_descriptors[pix_fmt].alias)))
return pix_fmt;
return AV_PIX_FMT_NONE;