mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
AudioFormat: use av_get_bytes_per_sample instead of hardcoded size
Change-Id: I915fe38db6547425cdccc516d05ebd9afcdb3aac
This commit is contained in:

committed by
Adrien Béraud

parent
e6a861249a
commit
e73fbc9630
@ -73,7 +73,7 @@ struct AudioFormat
|
||||
/**
|
||||
* Returns bytes necessary to hold one frame of audio data.
|
||||
*/
|
||||
inline size_t getBytesPerFrame() const { return sizeof(AudioSample) * nb_channels; }
|
||||
inline size_t getBytesPerFrame() const { return av_get_bytes_per_sample(sampleFormat) * nb_channels; }
|
||||
|
||||
/**
|
||||
* Bytes per second (default), or bytes necessary
|
||||
|
Reference in New Issue
Block a user