changeset 3851:9b3ad7f292a4 libavformat

do no write multi descriptor when only one track is present
author bcoudurier
date Sun, 31 Aug 2008 04:35:09 +0000
parents 84bc128c42d8
children 1b6245500d8c
files mxfenc.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mxfenc.c	Sun Aug 31 04:26:12 2008 +0000
+++ b/mxfenc.c	Sun Aug 31 04:35:09 2008 +0000
@@ -634,8 +634,11 @@
     // write multiple descriptor reference
     if (type == SourcePackage) {
         mxf_write_local_tag(pb, 16, 0x4701);
-        mxf_write_uuid(pb, MultipleDescriptor, 0);
-        mxf_write_multi_descriptor(s);
+        if (s->nb_streams > 1) {
+            mxf_write_uuid(pb, MultipleDescriptor, 0);
+            mxf_write_multi_descriptor(s);
+        } else
+            mxf_write_uuid(pb, SubDescriptor, 0);
     }
 
     for (i = 0; i < s->nb_streams; i++) {