- fseek(f, 0, SEEK_END);
- int length = ftell(f);
- unsigned char *buffer = new unsigned char[length*2+9];
- if (ioctl(vfd, VIDEO_FAST_FORWARD, 1) < 0)
- eDebug("VIDEO_FAST_FORWARD failed (%m)");
- if (ioctl(vfd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY) < 0)
+ bool seq_end_avail = false;
+ size_t pos=0;
+ unsigned char pes_header[] = { 0x00, 0x00, 0x01, 0xE0, 0x00, 0x00, 0x80, 0x00, 0x00 };
+ unsigned char seq_end[] = { 0x00, 0x00, 0x01, 0xB7 };
+ unsigned char iframe[s.st_size];
+ unsigned char stuffing[8192];
+ memset(stuffing, 0, 8192);
+ read(f, iframe, s.st_size);
+ if (ioctl(m_video_clip_fd, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_MEMORY) < 0)