samplefmt: remove deprecated use of av_get_bits_per_sample_fmt()

Use av_get_bytes_per_sample() instead.

Fix deprecation warning:
samplefmt.c: In function ‘av_samples_fill_arrays’:
samplefmt.c:88: warning: ‘av_get_bits_per_sample_fmt’ is deprecated (declared at samplefmt.c:76)
This commit is contained in:
Stefano Sabatini 2011-06-25 21:54:58 +02:00
parent 5aca97e247
commit 5fba761f6e
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ int av_samples_fill_arrays(uint8_t *pointers[8], int linesizes[8],
enum AVSampleFormat sample_fmt, int planar, int align) enum AVSampleFormat sample_fmt, int planar, int align)
{ {
int i, linesize; int i, linesize;
int sample_size = av_get_bits_per_sample_fmt(sample_fmt) >> 3; int sample_size = av_get_bytes_per_sample(sample_fmt);
if (nb_channels * (uint64_t)nb_samples * sample_size >= INT_MAX - align*(uint64_t)nb_channels) if (nb_channels * (uint64_t)nb_samples * sample_size >= INT_MAX - align*(uint64_t)nb_channels)
return AVERROR(EINVAL); return AVERROR(EINVAL);