• Andreas Rheinhardt's avatar
    avcodec/bsf: Restrict ff_bsf_get_packet_ref() return values to <= 0 · 47cd3c88
    Andreas Rheinhardt authored
    Up until now the documentation of ff_bsf_get_packet_ref() allowed return
    values >= 0 in case of success, whereas av_bsf_receive_packet() only
    allows 0 on success. Given that for some bitstream filters the return
    value of ff_bsf_get_packet_ref() is forwarded to the caller of
    av_bsf_receive_packet() without any filtering, there would be a problem
    if ff_bsf_get_packet_ref() actually returned values > 0. But it
    currently doesn't and there is no reason why it should ever do so.
    Therefore this commit aligns the return values of these functions by
    restricting ff_bsf_get_packet_ref() to always returns 0 on success.
    Reviewed-by: 's avatarJames Almer <jamrial@gmail.com>
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    47cd3c88
bsf.h 1.48 KB