• Andreas Rheinhardt's avatar
    avcodec/cbs_sei: Use RefStruct API for SEI messages · 3ba4f9c2
    Andreas Rheinhardt authored
    The SEI message code uses the AVBuffer API for its SEI messages
    and contained buffers (like the extension buffer for HEVC
    or the user data (un)registered payload buffers).
    
    Contrary to the ordinary CBS code (where some of these
    contained buffer references are actually references
    to the provided AVPacket's data so that one can't replace
    them with the RefStruct API), the CBS SEI code never uses
    outside buffers at all and can therefore be switched entirely
    to the RefStruct API. This avoids the overhead inherent
    in the AVBuffer API (namely the separate allocations etc.).
    
    Notice that the refcounting here is actually currently unused;
    the refcounts are always one (or zero in case of no refcounting);
    its only advantage is the flexibility provided by custom
    free functions.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    3ba4f9c2
cbs_sei_syntax_template.c 9.83 KB