summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfenc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 5096a4b76c..1d36f44757 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -634,8 +634,11 @@ static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type)
// 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++) {