ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
{
    struct ogg *ogg = s->priv_data;
    ogg->curidx = -1;
    //linear headers seek from start
    if (ogg_get_headers (s) < 0){
        return -1;
    }
    //linear granulepos seek from end
    ogg_get_length (s);
    //fill the extradata in the per codec callbacks
    return 0;
}
ogg_read_header (AVFormatContext * s, AVFormatParameters * ap)
{
    struct ogg *ogg = s->priv_data;
    ogg->curidx = -1;
    
    if (ogg_get_headers (s) < 0){
        return -1;
    }
    
    ogg_get_length (s);
    
    return 0;
}
FUNC_0 (AVFormatContext * VAR_0, AVFormatParameters * VAR_1)
{
    struct VAR_2 *VAR_2 = VAR_0->priv_data;
    VAR_2->curidx = -1;
    
    if (ogg_get_headers (VAR_0) < 0){
        return -1;
    }
    
    ogg_get_length (VAR_0);
    
    return 0;
}
FUNC_0 (AVFormatContext * VAR_0, AVFormatParameters * VAR_1)
{ struct VAR_2 *VAR_2 = VAR_0->priv_data; VAR_2->curidx = -1; if (ogg_get_headers (VAR_0) < 0){ return -1; } ogg_get_length (VAR_0); return 0; }