Errata

Developing Microsoft Media Foundation Applications

Errata for Developing Microsoft Media Foundation Applications

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed, PDF, , Other Digital Version
Page 15
Last sentence

"To see the media types, click the link connecting two nodes to each other".
Actually, clicking onto the link does not change the attributes displayed in the gray area of TopoEdit. To see the media types, it is necessary to click on any of the nodes of the link.

Note from the Author or Editor:
You are right - it should say "To see the media types, click the small black square to which to the link connecting the two nodes is attached".

Holger Strauss  Dec 30, 2011 
Printed, PDF, , Other Digital Version
Page 18
1st paragraph

Why 1st paragraph on page 18 asks to add MPEG43 decoder and on the next page H264 decoder is used with same file ? With H264 TopoEdit doesn't want to render AVI_wildfile.avi file but with MPEG43 does.

Is is a typo or am I doing something wrong ?

Note from the Author or Editor:
He is right - the H264 decoder mentioned is left over from a previous version of the sample file that came with the book.

Timmy_A  Nov 19, 2011 
PDF
Page 24
Top

The Note says that MF uses free-threaded COM, but then states that COM should be started as STA (COINIT_
APARTMENTTHREADED). Shouldn't that be MTA, i.e., COINIT_MULTITHREADED? If STA is correct, there must be something missing to reach that conclusion.

Note from the Author or Editor:
Yes, you are right - this is a typo. Here is a discussion of threading in MF, and what you should pass to CoInitializeEx():

http://msdn.microsoft.com/en-us/library/windows/desktop/ee892371(v=vs.85).aspx

Magnus Larsson  Mar 27, 2013 
Printed, PDF, , Other Digital Version
Page 43
4th paragraph

"The CPlayer class delegates all the work required to build the media pipeline to the ????"

Note from the Author or Editor:
The end of a sentence got lost somehow during the copy-edit process. It looks like this was correct in the intermediate copy edit phase, but got lost and was missing in the final QC2 version - and I didn't catch it.

This is the second sentence in the first paragraph of the "Building the Media Pipeline" section on page 43.

The sentence right now says: "The CPlayer class delegates all the
work required to build the media pipeline to the ."

Instead, the sentence should read: "The CPlayer class delegates all the work required to build the media pipeline to the CTopoBuilder helper class."

Anonymous  Nov 15, 2011 
PDF
Page 112
Top

The pTypeAttributes argument in the pType->Compare() call refers to the same object as pType. That is, the given media type is compared to itself instead of to the configured output media type.

The same issue is present in the downloadable code sample.

Note from the Author or Editor:
Yes, you are right.

Magnus Larsson  Apr 08, 2013 
PDF
Page 128
Top

A simple copy/paste error. In the code comment, the word "four" should be "two" (two instances).

Note from the Author or Editor:
Yup, you are right.

Magnus Larsson  Apr 08, 2013 
PDF
Page 130
Top

The result of the call to MFGetStrideForBitmapInfoHeader is never assigned to m_stride.

Note from the Author or Editor:
Yes, I think you are right. That's probably when I tested this, I was always able to get the stride from the media type, and therefore never hit this error recovery code path.

Magnus Larsson  Apr 08, 2013 
Printed, PDF, , Other Digital Version
Page 153
last paragraph

'IMFAsyncCallbackPointer' should be replaced with 'IMFAsyncCallback pointer'.

Note from the Author or Editor:
You are right - this should be two separate words.

Timmy_A  Feb 09, 2012 
Printed, PDF,
Page 323
3rd paragraph

Event type can't be extracted using IMFAsyncResult::GetType(), because such method doesn't exist in interface IMFAsyncResult. You should use IMFMediaEvent::GetType() instead.

Note from the Author or Editor:
That is correct. It should indeed be IMFMediaEvent::GetType() instead of IMFAsyncResult::GetType().

Timmy_A  Dec 16, 2011 
Printed, PDF, , Other Digital Version
Page 340
source code

Missing while(false); statement at the end of do-while cycle.

Note from the Author or Editor:
Yes, this is a mistake. In the code sample on page 340 there should be an extra line with "while(false);" right after the curly bracket and before the "return hr;" line.

So instead of

" // do something with pResult and pResult1
}

return hr; "

the code sample should look like this:

"
// do something with pResult and pResult1
}
while(false);

return hr;"

Timmy_A  Nov 17, 2011 
Printed, PDF, , Other Digital Version
Page 344
source code

CComCritSecLock doesn't have constructor that takes pointer as an argument. Operator '&' in lock(&m_critSec) should be omitted.

Note from the Author or Editor:
This is true - it's a copy-paste error that appears in the appendix, on page 344. Instead of "CComCritSecLock<CComAutoCriticalSection> lock(&m_critSec);" it should be "CComCritSecLock<CComAutoCriticalSection> lock(m_critSec);" - without the ampersand. There are two examples of this problem on this page.

Timmy_A  Nov 17, 2011