• Andreas Rheinhardt's avatar
    h264_mp4toannexb: Simplify extradata insertion · aa486b4b
    Andreas Rheinhardt authored
    Up until now, h264_mp4toannexb stored the offset of the first SPS and
    the first PPS in the (output) extradata in its context and used these
    two numbers together with the size of the extradata and the pointer to
    the extradata to determine what to insert when inserting extradata. This
    led to some very long lines like "s->pps_offset != -1 ? s->pps_offset :
    ctx->par_out->extradata_size - s->sps_offset". Therefore now pointers to
    SPS and PPS are stored along with their respective sizes, so that e.g.
    the above line can be changed to "s->sps_size".
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    aa486b4b
h264_mp4toannexb_bsf.c 9.9 KB