diff options
| author | mschroffel <mschroffel@cinecert.com> | 2016-03-17 23:58:13 +0000 |
|---|---|---|
| committer | mschroffel <> | 2016-03-17 23:58:13 +0000 |
| commit | ed84256d7687b8255991308361e26013b7071dd9 (patch) | |
| tree | 58090552a149397f61944daf6cabf7208025f915 /src/as-02-unwrap.cpp | |
| parent | e10177793b42db5b9a8671dcff9e7c9cbc6a676a (diff) | |
included CMakelists.txt into dist
Diffstat (limited to 'src/as-02-unwrap.cpp')
| -rwxr-xr-x | src/as-02-unwrap.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/as-02-unwrap.cpp b/src/as-02-unwrap.cpp index 688656b..43fe12f 100755 --- a/src/as-02-unwrap.cpp +++ b/src/as-02-unwrap.cpp @@ -473,6 +473,20 @@ read_PCM_file(CommandOptions& Options) if ( last_frame == 0 ) { + fprintf(stderr, "ContainerDuration not set in index, attempting to use Duration from SourceClip.\n"); + result = Reader.OP1aHeader().GetMDObjectByType(DefaultCompositeDict().ul(MDD_SourceClip), &tmp_obj); + if ( KM_SUCCESS(result)) + { + ASDCP::MXF::SourceClip *sourceClip = dynamic_cast<ASDCP::MXF::SourceClip*>(tmp_obj); + if ( ! sourceClip->Duration.empty() ) + { + last_frame = sourceClip->Duration; + } + } + } + + if ( last_frame == 0 ) + { fprintf(stderr, "Unable to determine file duration.\n"); return RESULT_FAIL; } |
