static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv)

{

    int i;



    for (i = 0; i < s->nb_streams; i++) {

        MXFTrack *track = s->streams[i]->priv_data;

        /* SMPTE 379M 7.3 */

        if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))

            return i;

    }

    /* return 0 if only one stream, for OP Atom files with 0 as track number */

    return s->nb_streams == 1 ? 0 : -1;

}

static int mxf_get_stream_index(AVFormatContext *s, KLVPacket *klv)

{

    int i;



    for (i = 0; i < s->nb_streams; i++) {

        MXFTrack *track = s->streams[i]->priv_data;

        

        if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))

            return i;

    }

    

    return s->nb_streams == 1 ? 0 : -1;

}

        if (!memcmp(klv->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))
static int FUNC_0(AVFormatContext *VAR_0, KLVPacket *VAR_1)

{

    int VAR_2;



    for (VAR_2 = 0; VAR_2 < VAR_0->nb_streams; VAR_2++) {

        MXFTrack *track = VAR_0->streams[VAR_2]->priv_data;

        

        if (!memcmp(VAR_1->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))

            return VAR_2;

    }

    

    return VAR_0->nb_streams == 1 ? 0 : -1;

}

static int FUNC_0(AVFormatContext *VAR_0, KLVPacket *VAR_1)
{ int VAR_2; for (VAR_2 = 0; VAR_2 < VAR_0->nb_streams; VAR_2++) { MXFTrack *track = VAR_0->streams[VAR_2]->priv_data; if (!memcmp(VAR_1->key + sizeof(mxf_essence_element_key), track->track_number, sizeof(track->track_number)))
return VAR_2; } return VAR_0->nb_streams == 1 ? 0 : -1; }