• Andreas Rheinhardt's avatar
    avcodec/cbs: Use RefStruct-API for unit content · 3e9b8d14
    Andreas Rheinhardt authored
    This avoids allocations and error checks etc. as well
    as duplicate pointer lists in the CodedBitstreamFooContexts.
    It also avoids casting const away for use as opaque,
    as the RefStruct API supports const opaques.
    
    The fact that some of the units are not refcounted
    (i.e. they are sometimes part of an encoding context
    like VAAPIEncodeH264Context) meant that CodedBitstreamUnit
    still contains two pointers, one to the content
    and another ownership pointer, replacing the AVBufferRef* pointer.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    3e9b8d14
cbs_h264.h 12.6 KB