summaryrefslogtreecommitdiff
path: root/src/AS_DCP_MPEG2.cpp
diff options
context:
space:
mode:
authorjelkins <jelkins@cinecert.com>2020-10-09 11:43:06 -0700
committerjelkins <jelkins@cinecert.com>2020-10-09 11:43:06 -0700
commit97e63717adfef05acd1584897942f4834aeacfa0 (patch)
tree67edade91eab000311f8693660d1b87b0c54c3b5 /src/AS_DCP_MPEG2.cpp
parentfcfd47cf24b11abc98e1257b6f9fe73253fe9b31 (diff)
add more empty() checks and adjust whitespace
Diffstat (limited to 'src/AS_DCP_MPEG2.cpp')
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 2a11de2..b7e6252 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -60,13 +60,29 @@ MD_to_MPEG2_VDesc(MXF::MPEG2VideoDescriptor* VDescObj, MPEG2::VideoDescriptor& V
VDesc.ComponentDepth = VDescObj->ComponentDepth;
VDesc.HorizontalSubsampling = VDescObj->HorizontalSubsampling;
- VDesc.VerticalSubsampling = VDescObj->VerticalSubsampling;
- VDesc.ColorSiting = VDescObj->ColorSiting;
- VDesc.CodedContentType = VDescObj->CodedContentType;
+ if ( ! VDescObj->VerticalSubsampling.empty() )
+ {
+ VDesc.VerticalSubsampling = VDescObj->VerticalSubsampling;
+ }
+ if ( ! VDescObj->ColorSiting.empty() )
+ {
+ VDesc.ColorSiting = VDescObj->ColorSiting;
+ }
+ if ( ! VDescObj->CodedContentType.empty() )
+ {
+ VDesc.CodedContentType = VDescObj->CodedContentType;
+ }
VDesc.LowDelay = VDescObj->LowDelay.get() == 0 ? false : true;
- VDesc.BitRate = VDescObj->BitRate;
- VDesc.ProfileAndLevel = VDescObj->ProfileAndLevel;
+ if ( ! VDescObj->BitRate.empty() )
+ {
+ VDesc.BitRate = VDescObj->BitRate;
+ }
+ if ( ! VDescObj->ProfileAndLevel.empty() )
+ {
+ VDesc.ProfileAndLevel = VDescObj->ProfileAndLevel;
+ }
+
return RESULT_OK;
}