title: Decoding H264 VideoToolkit API fails with Error -8971 in VTDecompressionSessionCreate
body: <p>I am trying to write a Video decoder using the Hardware supported Video Toolkit Decoder. But if I try to initialize the decoding session like in the example posted below, I get the error -8971 while calling VTDecompressionSessionCreate. Can anyone tell me what I am doing wrong here?</p>
  
  <p>Thank you and best regards,</p>
  
  <p>Oliver</p>
  
  <pre><code>OSStatus status;
  
  int tmpWidth = sps.EncodedWidth();
  int tmpHeight = sps.EncodedHeight();
  NSLog(@"Got new Width and Height from SPS - %dx%d", tmpWidth, tmpHeight);
  
  const VTDecompressionOutputCallbackRecord callback = { ReceivedDecompressedFrame, self };
  status = CMVideoFormatDescriptionCreate(NULL,
                                         kCMVideoCodecType_H264,
                                         tmpWidth,
                                         tmpHeight,
                                         NULL,
                                         &amp;decoderFormatDescription);
  
  if (status == noErr)
  {
      // Set the pixel attributes for the destination buffer
      CFMutableDictionaryRef destinationPixelBufferAttributes = CFDictionaryCreateMutable(
                                                                   NULL, // CFAllocatorRef allocator
                                                                   0,    // CFIndex capacity
                                                                   &amp;kCFTypeDictionaryKeyCallBacks, 
                                                                   &amp;kCFTypeDictionaryValueCallBacks);
  
      SInt32 destinationPixelType = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
      CFDictionarySetValue(destinationPixelBufferAttributes,kCVPixelBufferPixelFormatTypeKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &amp;destinationPixelType));
      CFDictionarySetValue(destinationPixelBufferAttributes,kCVPixelBufferWidthKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &amp;tmpWidth));
      CFDictionarySetValue(destinationPixelBufferAttributes, kCVPixelBufferHeightKey, CFNumberCreate(NULL, kCFNumberSInt32Type, &amp;tmpHeight));
      CFDictionarySetValue(destinationPixelBufferAttributes, kCVPixelBufferOpenGLCompatibilityKey, kCFBooleanTrue);
  
      // Set the Decoder Parameters
      CFMutableDictionaryRef decoderParameters = CFDictionaryCreateMutable(
                                                          NULL, // CFAllocatorRef allocator
                                                          0,    // CFIndex capacity
                                                          &amp;kCFTypeDictionaryKeyCallBacks,
                                                          &amp;kCFTypeDictionaryValueCallBacks);
  
      CFDictionarySetValue(decoderParameters,kVTDecompressionPropertyKey_RealTime, kCFBooleanTrue);
  
      // Create the decompression session
      // Throws Error -8971 (codecExtensionNotFoundErr)
      status = VTDecompressionSessionCreate(NULL, decoderFormatDescription, decoderParameters, destinationPixelBufferAttributes, &amp;callback, &amp;decoderDecompressionSession);
  
      // release the dictionaries
      CFRelease(destinationPixelBufferAttributes);
      CFRelease(decoderParameters);
  
      // Check the Status
      if(status != noErr)
      {
          NSLog(@"Error %d while creating Video Decompression Session.", (int)status);
          continue;
      }
  }
  else
  {
      NSLog(@"Error %d while creating Video Format Descripttion.", (int)status);
      continue;
  }
  </code></pre>