Skip to content
Snippets Groups Projects
Commit e73fbc96 authored by Adrien Béraud's avatar Adrien Béraud Committed by Adrien Béraud
Browse files

AudioFormat: use av_get_bytes_per_sample instead of hardcoded size

Change-Id: I915fe38db6547425cdccc516d05ebd9afcdb3aac
parent e6a86124
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment