/* USBD_VIDEO_GetVideoHeaderDesc This function return the Video Header descriptor.  */
static void * USBD_VIDEO_GetVideoHeaderDesc(uint8_t *pConfDesc)
/* USBD_VIDEO_GetVideoHeaderDesc This function return the Video Header descriptor.  */
static void * USBD_VIDEO_GetVideoHeaderDesc(uint8_t *pConfDesc)
{
  USBD_ConfigDescTypeDef *desc = (USBD_ConfigDescTypeDef *)(void *)pConfDesc;
  USBD_DescHeaderTypeDef *pdesc = (USBD_DescHeaderTypeDef *)(void *)pConfDesc;
  uint8_t *pVideoDesc = NULL;
  uint16_t ptr;
  if (desc->wTotalLength > desc->bLength)
  {
    ptr = desc->bLength;
    while (ptr < desc->wTotalLength)
    {
      pdesc = USBD_GetNextDesc((uint8_t *)pdesc, &ptr);
      if ((pdesc->bDescriptorType == CS_INTERFACE) &&
          (pdesc->bDescriptorSubType == VC_HEADER))
      {
        pVideoDesc = (uint8_t *)pdesc;
        break;
      }
    }
  }
  return pVideoDesc;
}