• conrad's avatar
    Fix regression introduced in 8c2da1 · ccd2a2fe
    conrad authored
    When using a recent liboggz, liboggplay fails to play some files. It
    appears it's only files with Kate streams, however some files with
    Kate streams do play fine, but liboggplay reports unknown
    category/language, so that's probably still failing, but in a way that
    liboggplay can recover from.
    
    A sample file which worked before and does not work now is the good old:
    http://people.xiph.org/~oggk/Stephen_Fry-Happy_Birthday_GNU-hq_600px_780kbit.ogv
    This file is seen as correct by oggz-validate.
    
    Issue:
    
    * when oggz_read() sees the first few packets before it sees a
    granulepos, it buffers them in a dlist
    * then, oggz_read_deliver_packet() is a dlist callback which goes
    through these buffered packets and calls the read callback for each
    * the commit you found by bisection returns an error if the
    read_callback returns non-zero; previously the read_callback return
    values were ignored
    * liboggplay's read_predetected(), the read_callback in use during
    stream detection, returns 1 (OGGZ_STOP_OK) when it has done what it
    needs to do
    
    ... hence, the STOP_OK value gets turned into an error value by the
    bad commit.
    
    Reported-by: ogg.k.ogg.k@googlemail.com
    Signed-off-by: conrad's avatarConrad Parker <conrad@metadecks.org>
    ccd2a2fe
oggz_read.c 19.6 KB