'Write tag data into the FLAC Vorbis comment packet/page.'

def _inject(self, fileobj, padding_func):

    fileobj.seek(0)
    page = OggPage(fileobj)
    while (not page.packets[0].startswith('\x7fFLAC')):
        page = OggPage(fileobj)
    first_page = page
    while (not ((page.sequence == 1) and (page.serial == first_page.serial))):
        page = OggPage(fileobj)
    old_pages = [page]
    while (not (old_pages[(-1)].complete or (len(old_pages[(-1)].packets) > 1))):
        page = OggPage(fileobj)
        if (page.serial == first_page.serial):
            old_pages.append(page)
    packets = OggPage.to_packets(old_pages, strict=False)
    data = self.write(framing=False)
    data = ((packets[0][:1] + struct.pack('>I', len(data))[(-3):]) + data)
    packets[0] = data
    new_pages = OggPage.from_packets(packets, old_pages[0].sequence)
    OggPage.replace(fileobj, old_pages, new_pages)
