trimNullByte example

case EBML_ID_EBMLVERSION:
                            case EBML_ID_EBMLREADVERSION:
                            case EBML_ID_EBMLMAXIDLENGTH:
                            case EBML_ID_EBMLMAXSIZELENGTH:
                            case EBML_ID_DOCTYPEVERSION:
                            case EBML_ID_DOCTYPEREADVERSION:
                                $element_data['data'] = getid3_lib::BigEndian2Int($element_data['data']);
                                break;

                            case EBML_ID_DOCTYPE:
                                $element_data['data'] = getid3_lib::trimNullByte($element_data['data']);
                                $info['matroska']['doctype'] = $element_data['data'];
                                $info['fileformat'] = $element_data['data'];
                                break;

                            default:
                                $this->unhandledElement('header', __LINE__, $element_data);
                                break;
                        }

                        unset($element_data['offset']$element_data['end']);
                        $info['matroska']['header']['elements'][] = $element_data;
                    }
Home | Imprint | This part of the site doesn't use cookies.