Revision 5ac4d768 libavformat/mxfdec.c

View differences:

libavformat/mxfdec.c
618 618

  
619 619
static const MXFCodecUL *mxf_get_codec_ul(const MXFCodecUL *uls, UID *uid)
620 620
{
621
    while (uls->id != CODEC_ID_NONE) {
621
    while (uls->uid[0]) {
622 622
        if(mxf_match_uid(uls->uid, *uid, uls->matching_len))
623 623
            break;
624 624
        uls++;
......
626 626
    return uls;
627 627
}
628 628

  
629
static enum CodecType mxf_get_codec_type(const MXFDataDefinitionUL *uls, UID *uid)
630
{
631
    while (uls->type != CODEC_TYPE_DATA) {
632
        if(mxf_match_uid(uls->uid, *uid, 16))
633
            break;
634
        uls++;
635
    }
636
    return uls->type;
637
}
638

  
639 629
static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMetadataSetType type)
640 630
{
641 631
    int i;
......
757 747
        }
758 748

  
759 749
        PRINT_KEY(mxf->fc, "data definition   ul", source_track->sequence->data_definition_ul);
760
        st->codec->codec_type = mxf_get_codec_type(ff_mxf_data_definition_uls, &source_track->sequence->data_definition_ul);
750
        codec_ul = mxf_get_codec_ul(ff_mxf_data_definition_uls, &source_track->sequence->data_definition_ul);
751
        st->codec->codec_type = codec_ul->id;
761 752

  
762 753
        source_package->descriptor = mxf_resolve_strong_ref(mxf, &source_package->descriptor_ref, AnyType);
763 754
        if (source_package->descriptor) {

Also available in: Unified diff