Revision ba32c8df libavformat/mxf.c

View differences:

libavformat/mxf.c
919 919
}
920 920

  
921 921
static int mxf_probe(AVProbeData *p) {
922
    /* KLV packet describing MXF header partition pack */
922
    uint8_t *bufp = p->buf;
923
    uint8_t *end = p->buf + p->buf_size;
924

  
923 925
    if (p->buf_size < sizeof(mxf_header_partition_pack_key))
924 926
        return 0;
925 927

  
926
    if (IS_KLV_KEY(p->buf, mxf_header_partition_pack_key))
927
        return AVPROBE_SCORE_MAX;
928
    else
929
        return 0;
928
    /* Must skip Run-In Sequence and search for MXF header partition pack key SMPTE 377M 5.5 */
929
    end -= sizeof(mxf_header_partition_pack_key);
930
    for (; bufp < end; bufp++) {
931
        if (IS_KLV_KEY(bufp, mxf_header_partition_pack_key))
932
            return AVPROBE_SCORE_MAX;
933
    }
934
    return 0;
930 935
}
931 936

  
932 937

  

Also available in: Unified diff