parsing layer from mpeg audio header
#1
While troubleshooting some issues with mpeg audio on the vompclient raspberry port (using the vompserver vdr plugin) I compared sources withe the vnsi plugin.

It appears as if the layer description parsed from the mpeg audio header is done wrong in the vnsi plugin. In line 109 of:

https://github.com/FernetMenta/xbmc-pvr-...PEGAudio.c

the layer is calculated as:
Code:
int layer = bs.readBits(2);
  if (layer == 0)
    return 0;

The layer should rather be calculated as:
Code:
int layer = bs.readBits(2);
   if (layer == 0)
      return 0;
   layer = 4 - layer;

I guess the impact is not that severe since most of the times the layer description is 2 and 4 - 2 = 2
For robustness though I think the calculation shall be corrected.
Reply
#2
Thanks, I will fix it or you send me a pull request Smile
Reply

Logout Mark Read Team Forum Stats Members Help
parsing layer from mpeg audio header0