diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-26 21:19:18 +0400 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-28 20:25:40 +0400 |
commit | e71f26086ab899be7df1efb30b33e0a11973fd8e (patch) | |
tree | e4e1579d6cd528b113512f50d5995b3933b9ded8 /libavcodec/imgconvert.c | |
parent | 34e9c9b11192271a4e5d0557441d09686852c771 (diff) |
lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.
Diffstat (limited to 'libavcodec/imgconvert.c')
-rw-r--r-- | libavcodec/imgconvert.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index a86d2bd027..9aa584fa5c 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -417,13 +417,12 @@ void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int * *v_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_h; } +#if FF_API_GET_PIX_FMT_NAME const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt) { - if ((unsigned)pix_fmt >= PIX_FMT_NB) - return NULL; - else - return av_pix_fmt_descriptors[pix_fmt].name; + return av_get_pix_fmt_name(pix_fmt); } +#endif int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt) { |