diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-26 19:19:18 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-28 18:25:40 +0200 |
commit | e71f26086ab899be7df1efb30b33e0a11973fd8e (patch) | |
tree | e4e1579d6cd528b113512f50d5995b3933b9ded8 /libavutil/pixdesc.c | |
parent | 34e9c9b11192271a4e5d0557441d09686852c771 (diff) | |
download | ffmpeg-e71f26086ab899be7df1efb30b33e0a11973fd8e.tar.gz |
lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.
Diffstat (limited to 'libavutil/pixdesc.c')
-rw-r--r-- | libavutil/pixdesc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index f8f99289f9..57a3860e71 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -906,6 +906,12 @@ static enum PixelFormat get_pix_fmt_internal(const char *name) return PIX_FMT_NONE; } +const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt) +{ + return (unsigned)pix_fmt < PIX_FMT_NB ? + av_pix_fmt_descriptors[pix_fmt].name : NULL; +} + #if HAVE_BIGENDIAN # define X_NE(be, le) be #else |