changeset 1310:6904eb006d7b libavformat

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
author bcoudurier
date Mon, 11 Sep 2006 22:05:43 +0000
parents 59b0e373c549
children d35cbb48d76d
files mxf.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mxf.c	Sun Sep 10 21:51:08 2006 +0000
+++ b/mxf.c	Mon Sep 11 22:05:43 2006 +0000
@@ -319,7 +319,10 @@
         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 @@
         default:
             url_fskip(pb, size);
         }
-        bytes_read += size + 4;
     }
     source_clip->type = SourceClip;
     return mxf_add_metadata_set(mxf, source_clip);