Parent: 9f2ccfce8f0beec061554aabf2ff880b03ecdfcc
Author: Pali Rohár <pali.rohar@gmail.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2018-12-28 20:09:41
Tree: 0f4271c88f943e522d04f79550bd13507d98e3fb
a2dp-codecs & avinfo: Fix parsing MPEG bit rate values Redefine bitrate field in a2dp_mpeg_t struct in endian neutral way and separate vbr field according to A2DP specification. Define new macros MPEG_GET_BITRATE() and MPEG_SET_BITRATE() for manipulating with bitrate like for a2dp_aac_t struct. And fix meaning of bitrate field. According to A2DP specification, it is bitrate index, not bitrate itself. According to MPEG specification, each MPEG layer have different bitrates for bitrate indexes. Therefore define correctly bitrates for Layers 1, 2 and 3. This fixes problems with parsing bitrate field in a2dp_mpeg_t struct as it was broken due to endianity and it was broken for Layer 1 and 2 as bitrate definitions was for Layer 3.
Diffstat
| M | profiles/audio/a2dp-codecs.h | | | 93 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - |
| M | tools/avinfo.c | | | 135 | ++++++++++++++++++++++++++++++++++++++++- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
2 files changed, 176 insertions(+), 52 deletions(-)