diff options
| author | jelkins <jelkins@cinecert.com> | 2020-10-08 17:29:11 -0700 |
|---|---|---|
| committer | jelkins <jelkins@cinecert.com> | 2020-10-08 17:29:11 -0700 |
| commit | 1d4a906682d19207b0885d90f25fe3e5fd9bb844 (patch) | |
| tree | cd3d8574cef08f6e09227419c61a41a0bb43d982 /src/as-02-unwrap.cpp | |
| parent | ee40718aa383cb40beb67be317b3565c218d32c1 (diff) | |
check values for ContainerDuration.
Diffstat (limited to 'src/as-02-unwrap.cpp')
| -rwxr-xr-x | src/as-02-unwrap.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/as-02-unwrap.cpp b/src/as-02-unwrap.cpp index f0b3ba3..8625012 100755 --- a/src/as-02-unwrap.cpp +++ b/src/as-02-unwrap.cpp @@ -315,8 +315,10 @@ read_JP2K_file(CommandOptions& Options) if ( KM_SUCCESS(result) ) { assert(rgba_descriptor); - frame_count = (ui32_t)rgba_descriptor->ContainerDuration; - + if ( ! rgba_descriptor->ContainerDuration.empty() ) + { + frame_count = (ui32_t)rgba_descriptor->ContainerDuration; + } if ( Options.verbose_flag ) { rgba_descriptor->Dump(); @@ -330,8 +332,10 @@ read_JP2K_file(CommandOptions& Options) if ( KM_SUCCESS(result) ) { assert(cdci_descriptor); - frame_count = (ui32_t)cdci_descriptor->ContainerDuration; - + if ( ! cdci_descriptor->ContainerDuration.empty() ) + { + frame_count = (ui32_t)cdci_descriptor->ContainerDuration; + } if ( Options.verbose_flag ) { cdci_descriptor->Dump(); @@ -454,8 +458,10 @@ read_ACES_file(CommandOptions& Options) if (KM_SUCCESS(result)) { assert(aces_descriptor); - frame_count = aces_descriptor->ContainerDuration; - + if ( ! aces_descriptor->ContainerDuration.empty() ) + { + frame_count = aces_descriptor->ContainerDuration; + } if (Options.verbose_flag) { aces_descriptor->Dump(); @@ -665,7 +671,10 @@ read_PCM_file(CommandOptions& Options) } else { - last_frame = (ui32_t)wave_descriptor->ContainerDuration; + if ( ! wave_descriptor->ContainerDuration.empty() ) + { + last_frame = (ui32_t)wave_descriptor->ContainerDuration; + } } if ( last_frame == 0 ) |
