#7 GetCodecDef() assertion bug

closed-fixed
Jim Trainor
None
5
2003-03-26
2002-07-13
John Emmas
No

ImplAAFFileDescriptor::GetCodecDef() (in module
ImplAAFFileDescriptor.cpp) asserts if the _codecDef
property is not present. However, _codecDef is an
optional property, therefore the correct function should
read:-

AAFRESULT STDMETHODCALLTYPE
ImplAAFFileDescriptor::GetCodecDef
(ImplAAFCodecDef **ppDef)
{
if(ppDef == NULL)
return AAFFRESULT_NULL_PARAM);

if (!_codecDef.isPresent())
return AAFRESULT_PROP_NOT_PRESENT;

*ppDef = _codecDef;
assert (*ppDef);
if (*ppDef)
(*ppDef)->AcquireReference ();
return AAFRESULT_SUCCESS;
}

Discussion

  • Jim Trainor
    Jim Trainor
    2003-03-25

    Logged In: YES
    user_id=239292

    Correct.

    While checking this out I also found a documentation error in
    the latest spec regarding the "optionality" of the Length and
    ContainerFormat properties. See bug 709683

     
  • Jim Trainor
    Jim Trainor
    2003-03-25

    • status: open --> closed-fixed
     
  • Jim Trainor
    Jim Trainor
    2003-03-26

    • assigned_to: nobody --> jptrainor