• Mans Rullgard's avatar
    h264: fix detection of optional trailing PPS elements · be1242a3
    Mans Rullgard authored
    
    
    The PPS may contain a few trailing elements whose presence is
    only signalled by data remaining after the the mandatory part
    has been parsed.  The current code fails to take into account
    the rbsp_trailing_bits() when deciding whether to parse these
    optional elements.  Assuming no unnecessary padding bytes are
    passed to this function, the optional elements are present if
    either more than 8 extra bits remain or the remaining bits do
    not form a valid rbsp_trailing_bits() after the mandatory PPS
    elements have been parsed.
    
    Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
    be1242a3