• Andreas Rheinhardt's avatar
    avcodec/libx265: Don't use AVBPrint unnecessarily · 244db710
    Andreas Rheinhardt authored
    This code uses the AVBPrint API for exactly one av_bprintf()
    in a scenario in which a good upper bound for the needed
    size of the buffer is available (with said upper bound being
    much smaller than sizeof(AVBPrint)). So one can simply use
    snprintf() instead. This also avoids the (always-false due to
    the current size of the internal AVBPrint buffer) check for
    whether the AVBPrint is complete.
    
    Furthermore, the old code used AV_BPRINT_SIZE_AUTOMATIC
    which implies that the AVBPrint buffer will never be
    (re)allocated and yet it used av_bprint_finalize().
    This has of course also been removed.
    Reviewed-by: 's avatarJan Ekström <jeebjp@gmail.com>
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
    244db710
libx265.c 32.1 KB