~ubuntu-branches/ubuntu/lucid/ffmpeg/lucid-updates

« back to all changes in this revision

Viewing changes to libavformat/mxfdec.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-03-13 09:18:28 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090313091828-n4ktby5eca487uhv
Tags: 3:0.svn20090303-1ubuntu1+unstripped1
merge from ubuntu.jaunty branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
//#define DEBUG
47
47
 
48
48
#include "libavutil/aes.h"
 
49
#include "libavcodec/bytestream.h"
 
50
#include "avformat.h"
49
51
#include "mxf.h"
50
52
 
51
53
typedef struct {
616
618
 
617
619
static const MXFCodecUL *mxf_get_codec_ul(const MXFCodecUL *uls, UID *uid)
618
620
{
619
 
    while (uls->id != CODEC_ID_NONE) {
 
621
    while (uls->uid[0]) {
620
622
        if(mxf_match_uid(uls->uid, *uid, uls->matching_len))
621
623
            break;
622
624
        uls++;
624
626
    return uls;
625
627
}
626
628
 
627
 
static enum CodecType mxf_get_codec_type(const MXFDataDefinitionUL *uls, UID *uid)
628
 
{
629
 
    while (uls->type != CODEC_TYPE_DATA) {
630
 
        if(mxf_match_uid(uls->uid, *uid, 16))
631
 
            break;
632
 
        uls++;
633
 
    }
634
 
    return uls->type;
635
 
}
636
 
 
637
629
static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMetadataSetType type)
638
630
{
639
631
    int i;
755
747
        }
756
748
 
757
749
        PRINT_KEY(mxf->fc, "data definition   ul", source_track->sequence->data_definition_ul);
758
 
        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;
759
752
 
760
753
        source_package->descriptor = mxf_resolve_strong_ref(mxf, &source_package->descriptor_ref, AnyType);
761
754
        if (source_package->descriptor) {