Revision 975c88e3 libavformat/mxf.c

View differences:

libavformat/mxf.c
814 814
    url_fseek(&s->pb, -14, SEEK_CUR);
815 815
    mxf->fc = s;
816 816
    while (!url_feof(&s->pb)) {
817
        const MXFMetadataReadTableEntry *function;
817
        const MXFMetadataReadTableEntry *metadata;
818 818

  
819 819
        if (klv_read_packet(&klv, &s->pb) < 0) {
820 820
            av_log(s, AV_LOG_ERROR, "error reading KLV packet\n");
......
829 829
            break;
830 830
        }
831 831

  
832
        for (function = mxf_metadata_read_table; function->read; function++) {
833
            if (IS_KLV_KEY(klv.key, function->key)) {
834
                if (mxf_read_local_tags(mxf, &klv, function->read, function->ctx_size, function->type) < 0) {
832
        for (metadata = mxf_metadata_read_table; metadata->read; metadata++) {
833
            if (IS_KLV_KEY(klv.key, metadata->key)) {
834
                if (mxf_read_local_tags(mxf, &klv, metadata->read, metadata->ctx_size, metadata->type) < 0) {
835 835
                    av_log(s, AV_LOG_ERROR, "error reading header metadata\n");
836 836
                    return -1;
837 837
                }
838 838
                break;
839 839
            }
840 840
        }
841
        if (!function->read)
841
        if (!metadata->read)
842 842
            url_fskip(&s->pb, klv.length);
843 843
    }
844 844
    return mxf_parse_structural_metadata(mxf);

Also available in: Unified diff