summaryrefslogtreecommitdiff
path: root/src/AS_DCP_MPEG2.cpp
diff options
context:
space:
mode:
authorjelkins <jelkins@cinecert.com>2020-10-08 17:29:11 -0700
committerjelkins <jelkins@cinecert.com>2020-10-08 17:29:11 -0700
commit1d4a906682d19207b0885d90f25fe3e5fd9bb844 (patch)
treecd3d8574cef08f6e09227419c61a41a0bb43d982 /src/AS_DCP_MPEG2.cpp
parentee40718aa383cb40beb67be317b3565c218d32c1 (diff)
check values for ContainerDuration.
Diffstat (limited to 'src/AS_DCP_MPEG2.cpp')
-rwxr-xr-xsrc/AS_DCP_MPEG2.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/AS_DCP_MPEG2.cpp b/src/AS_DCP_MPEG2.cpp
index 8afa8bc..2a11de2 100755
--- a/src/AS_DCP_MPEG2.cpp
+++ b/src/AS_DCP_MPEG2.cpp
@@ -48,9 +48,11 @@ MD_to_MPEG2_VDesc(MXF::MPEG2VideoDescriptor* VDescObj, MPEG2::VideoDescriptor& V
VDesc.SampleRate = VDescObj->SampleRate;
VDesc.EditRate = VDescObj->SampleRate;
VDesc.FrameRate = VDescObj->SampleRate.Numerator;
- assert(VDescObj->ContainerDuration <= 0xFFFFFFFFL);
- VDesc.ContainerDuration = (ui32_t) VDescObj->ContainerDuration;
-
+ if ( ! VDescObj->ContainerDuration.empty() )
+ {
+ assert(VDescObj->ContainerDuration <= 0xFFFFFFFFL);
+ VDesc.ContainerDuration = (ui32_t) VDescObj->ContainerDuration;
+ }
VDesc.FrameLayout = VDescObj->FrameLayout;
VDesc.StoredWidth = VDescObj->StoredWidth;
VDesc.StoredHeight = VDescObj->StoredHeight;
@@ -77,7 +79,6 @@ MPEG2_VDesc_to_MD(MPEG2::VideoDescriptor& VDesc, MXF::MPEG2VideoDescriptor* VDes
VDescObj->SampleRate = VDesc.SampleRate;
VDescObj->ContainerDuration = VDesc.ContainerDuration;
-
VDescObj->FrameLayout = VDesc.FrameLayout;
VDescObj->StoredWidth = VDesc.StoredWidth;
VDescObj->StoredHeight = VDesc.StoredHeight;