summaryrefslogtreecommitdiff
path: root/libavformat/mxf.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-09-11 22:05:43 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-09-11 22:05:43 +0000
commitd70e3ff410b0f945a6249658465d807dedfa7857 (patch)
tree6d98258519cd43800552619363b3c0a19ff7824a /libavformat/mxf.c
parent9fe84b538544e5991a7d9a93b5c0cf7cba309468 (diff)
workaround for files, mainly d-cinema, with 0 sized tags especially UMID in source clip, 377M B.10,13 clearly mentions that this is non standard though
Originally committed as revision 6230 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxf.c')
-rw-r--r--libavformat/mxf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index 46c8f50fa7..9e63d9fe5b 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -319,7 +319,10 @@ static int mxf_read_metadata_source_clip(MXFContext *mxf, KLVPacket *klv)
int tag = get_be16(pb);
int size = get_be16(pb); /* SMPTE 336M Table 8 KLV specified length, 0x53 */
+ bytes_read += size + 4;
dprintf("tag 0x%04X, size %d\n", tag, size);
+ if (!size) /* ignore empty tag, needed for some files with empty UMID tag */
+ continue;
switch (tag) {
case 0x3C0A:
get_buffer(pb, source_clip->uid, 16);
@@ -341,7 +344,6 @@ static int mxf_read_metadata_source_clip(MXFContext *mxf, KLVPacket *klv)
default:
url_fskip(pb, size);
}
- bytes_read += size + 4;
}
source_clip->type = SourceClip;
return mxf_add_metadata_set(mxf, source_clip);