diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-05-28 04:39:20 +0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-28 17:44:18 +0400 |
commit | 8f653e28f54d6629c22a7135dff4c32dfc95acda (patch) | |
tree | 23567cae986d63c9e91f6bae94922658b616daac /libavcodec/imgconvert.c | |
parent | 26513856d657de3b3afacae7c13fd99a7fe79d05 (diff) |
lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
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 23e4318c71..351ed7ada7 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) { |