diff options
Diffstat (limited to 'src/AS_DCP_DCData.cpp')
| -rw-r--r-- | src/AS_DCP_DCData.cpp | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/AS_DCP_DCData.cpp b/src/AS_DCP_DCData.cpp index 6ee1098..faa02a0 100644 --- a/src/AS_DCP_DCData.cpp +++ b/src/AS_DCP_DCData.cpp @@ -96,20 +96,26 @@ ASDCP::DCData::h__Reader::OpenRead(const char* filename) Result_t result = OpenMXFRead(filename); if( ASDCP_SUCCESS(result) ) - { - if (NULL == m_EssenceDescriptor) { - InterchangeObject* iObj = NULL; - result = m_HeaderPart.GetMDObjectByType(OBJ_TYPE_ARGS(DCDataDescriptor), &iObj); - m_EssenceDescriptor = static_cast<MXF::DCDataDescriptor*>(iObj); + if (NULL == m_EssenceDescriptor) + { + InterchangeObject* iObj = NULL; + result = m_HeaderPart.GetMDObjectByType(OBJ_TYPE_ARGS(DCDataDescriptor), &iObj); + m_EssenceDescriptor = static_cast<MXF::DCDataDescriptor*>(iObj); + + if ( m_EssenceDescriptor == 0 ) + { + DefaultLogSink().Error("DCDataDescriptor object not found.\n"); + return RESULT_FORMAT; + } + } + + if ( ASDCP_SUCCESS(result) ) + { + result = MD_to_DCData_DDesc(m_DDesc); + } } - if ( ASDCP_SUCCESS(result) ) - { - result = MD_to_DCData_DDesc(m_DDesc); - } - } - // check for sample/frame rate sanity if ( ASDCP_SUCCESS(result) && m_DDesc.EditRate != EditRate_24 |
