mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 15:49:50 +08:00
lavu: add av_get_pix_fmt_name() convenience function
Also deprecate avcodec_get_pix_fmt_name() in its favor.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user