diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-08 08:12:30 +0300 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-02-08 08:12:30 +0300 |
commit | 5ac4d7689d753147f89b3322593d6998e32d27c4 (patch) | |
tree | 50b467ac3ac14896987aa760458768383c1244df /libavformat/mxfdec.c | |
parent | 251bf87560c0c4d1c0a35e73eed76fa6d60a6ab3 (diff) |
reuse MXFCodecUL for data def and simplify
Originally committed as revision 17042 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 7090e23fd1..3933d4c87e 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -618,7 +618,7 @@ static int mxf_match_uid(const UID key, const UID uid, int len) static const MXFCodecUL *mxf_get_codec_ul(const MXFCodecUL *uls, UID *uid) { - while (uls->id != CODEC_ID_NONE) { + while (uls->uid[0]) { if(mxf_match_uid(uls->uid, *uid, uls->matching_len)) break; uls++; @@ -626,16 +626,6 @@ static const MXFCodecUL *mxf_get_codec_ul(const MXFCodecUL *uls, UID *uid) return uls; } -static enum CodecType mxf_get_codec_type(const MXFDataDefinitionUL *uls, UID *uid) -{ - while (uls->type != CODEC_TYPE_DATA) { - if(mxf_match_uid(uls->uid, *uid, 16)) - break; - uls++; - } - return uls->type; -} - static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMetadataSetType type) { int i; @@ -757,7 +747,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) } PRINT_KEY(mxf->fc, "data definition ul", source_track->sequence->data_definition_ul); - st->codec->codec_type = mxf_get_codec_type(ff_mxf_data_definition_uls, &source_track->sequence->data_definition_ul); + codec_ul = mxf_get_codec_ul(ff_mxf_data_definition_uls, &source_track->sequence->data_definition_ul); + st->codec->codec_type = codec_ul->id; source_package->descriptor = mxf_resolve_strong_ref(mxf, &source_package->descriptor_ref, AnyType); if (source_package->descriptor) { |