aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 22:20:49 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-11-02 22:20:49 +0000
commit6f84cd127947394e53a6621e9ed077517df5a6d2 (patch)
tree3693859eec8e3bdadf4a9a9f162aae56173e628e /libavcodec/utils.c
parentd63e456a2abcc8c23962f2b8828004c6a35ca1fe (diff)
downloadffmpeg-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 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ffd34eee14..8169b374b5 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1064,21 +1064,11 @@ int av_get_bits_per_sample(enum CodecID codec_id){
}
}
+#if FF_API_OLD_SAMPLE_FMT
int av_get_bits_per_sample_format(enum SampleFormat sample_fmt) {
- switch (sample_fmt) {
- case SAMPLE_FMT_U8:
- return 8;
- case SAMPLE_FMT_S16:
- return 16;
- case SAMPLE_FMT_S32:
- case SAMPLE_FMT_FLT:
- return 32;
- case SAMPLE_FMT_DBL:
- return 64;
- default:
- return 0;
- }
+ return av_get_bits_per_sample_fmt(sample_fmt);
}
+#endif
#if !HAVE_THREADS
int avcodec_thread_init(AVCodecContext *s, int thread_count){