summaryrefslogtreecommitdiff
path: root/src/AS_DCP_DCData.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2013-06-04 05:22:27 +0000
committerjhurst <>2013-06-04 05:22:27 +0000
commit12051ad32d54a72a1a8682e15af1a185a61f1c61 (patch)
tree952a756375d6fd0c53d36d7521d2cc4ec355ddd5 /src/AS_DCP_DCData.cpp
parentde10f4a1f35fce05226b267baf6622e67e3d4c83 (diff)
working j2c as-02
Diffstat (limited to 'src/AS_DCP_DCData.cpp')
-rw-r--r--src/AS_DCP_DCData.cpp28
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