diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-02 22:20:49 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-02 22:20:49 +0000 |
commit | 6f84cd127947394e53a6621e9ed077517df5a6d2 (patch) | |
tree | 3693859eec8e3bdadf4a9a9f162aae56173e628e /libavcore/samplefmt.c | |
parent | d63e456a2abcc8c23962f2b8828004c6a35ca1fe (diff) | |
download | ffmpeg-streaming-6f84cd127947394e53a6621e9ed077517df5a6d2.zip ffmpeg-streaming-6f84cd127947394e53a6621e9ed077517df5a6d2.tar.gz |
Add av_get_bits_per_sample_fmt() to libavcore/samplefmt.h and
deprecate av_get_bits_per_sample_format().
Originally committed as revision 25654 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore/samplefmt.c')
-rw-r--r-- | libavcore/samplefmt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcore/samplefmt.c b/libavcore/samplefmt.c index 49ab829..532acd9 100644 --- a/libavcore/samplefmt.c +++ b/libavcore/samplefmt.c @@ -62,3 +62,9 @@ char *av_get_sample_fmt_string (char *buf, int buf_size, enum AVSampleFormat sam return buf; } + +int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt) +{ + return sample_fmt < 0 || sample_fmt >= AV_SAMPLE_FMT_NB ? + 0 : sample_fmt_info[sample_fmt].bits; +} |