summaryrefslogtreecommitdiff
path: root/src/phdr-unwrap.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/phdr-unwrap.cpp
parentee40718aa383cb40beb67be317b3565c218d32c1 (diff)
check values for ContainerDuration.
Diffstat (limited to 'src/phdr-unwrap.cpp')
-rwxr-xr-xsrc/phdr-unwrap.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/phdr-unwrap.cpp b/src/phdr-unwrap.cpp
index bd5a5a3..21c088c 100755
--- a/src/phdr-unwrap.cpp
+++ b/src/phdr-unwrap.cpp
@@ -281,8 +281,10 @@ read_JP2K_file(CommandOptions& Options)
if ( KM_SUCCESS(result) )
{
assert(rgba_descriptor);
- frame_count = rgba_descriptor->ContainerDuration;
-
+ if ( ! rgba_descriptor->ContainerDuration.empty() )
+ {
+ frame_count = rgba_descriptor->ContainerDuration;
+ }
if ( Options.verbose_flag )
{
rgba_descriptor->Dump();
@@ -296,8 +298,10 @@ read_JP2K_file(CommandOptions& Options)
if ( KM_SUCCESS(result) )
{
assert(cdci_descriptor);
- frame_count = cdci_descriptor->ContainerDuration;
-
+ if ( ! cdci_descriptor->ContainerDuration.empty() )
+ {
+ frame_count = cdci_descriptor->ContainerDuration;
+ }
if ( Options.verbose_flag )
{
cdci_descriptor->Dump();