[bTSstream-devel] Descriptor 0x6D ...

debug asm debugasm at gmail.com
Wed Apr 6 09:52:40 CEST 2016


I have found, if I understand it, a bug on descriptor 0x6D right here:

static inline void desc6dn_set_frequency(unsigned char *p_desc_n, uint16_t
i_frequency)
{
    p_desc_n[2] = (i_frequency >> 24) & 0xff;
    p_desc_n[3] = (i_frequency >> 16) & 0xff;
    p_desc_n[4] = (i_frequency >>  8) & 0xff;
    p_desc_n[5] =  i_frequency        & 0xff;
}

"uint16_t i_frequency" It should not be "uint32_t i_frequency" as for the
get ?

static inline uint32_t desc6dn_get_frequency(const unsigned char *p_desc_n)
{
    return (p_desc_n[2] << 24) | (p_desc_n[3] << 16) | (p_desc_n[4] << 8) |
p_desc_n[5];
}

I hope I have made a small contribution to this magnificent library.

Thanks very much.

Best Regards,

debugasm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/bitstream-devel/attachments/20160406/a32e681b/attachment-0001.html>


More information about the biTStream-devel mailing list