Giter Site home page Giter Site logo

gfto / bitstream Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 23.0 708 KB

biTStream is a set of C headers allowing a simpler access to binary structures such as specified by MPEG, DVB, IETF, etc. This repository is mirror of official repo at git://git.videolan.org/bitstream.git and my personal development tree.

Home Page: http://git.videolan.org/?p=bitstream.git

License: MIT License

C 89.76% C++ 9.99% Makefile 0.25%

bitstream's Issues

Wrong right shift in a52e_get_strmtyp()

Shouldn't the result in a52e_get_strmtyp() be right shifted 6 times, instead of 5, to get a value masked with 0xc0 "down"?
a52e_set_strmtyp() shifts the value left 6 times when setting a new value.

desc48_get_provider vs desc48_get_service ...

Hi,

in the descriptr 0x48 the returned parameter is different, one is "const" one is not.

static inline const uint8_t *desc48_get_provider(const uint8_t *p_desc,
                                                 uint8_t *pi_length)
{
    const uint8_t *p = p_desc + DESC48_HEADER_SIZE;
    *pi_length = p[0];
    return p + 1;
}

static inline uint8_t *desc48_get_service(const uint8_t *p_desc,
                                          uint8_t *pi_length)
{
    uint8_t *p = (uint8_t *)p_desc + DESC48_HEADER_SIZE + 1 + p_desc[3];
    *pi_length = p[0];
    return p + 1;
}

The first one generate "warning", in my opinion, the structure of "desc48_get_service" is more correct and can also be used for "desc48_get_provider"

static inline uint8_t *desc48_get_provider(const uint8_t *p_desc,
                                           uint8_t *pi_length)
{
    uint8_t *p = (uint8_t *)p_desc + DESC48_HEADER_SIZE;
    *pi_length = p[0];
    return p + 1;
}

debugasm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.