36 #define BVID_PALETTE_SIZE 3 * 256
38 #define DEFAULT_SAMPLE_RATE 11111
92 #define BUFFER_PADDING_SIZE 1000
97 int vidbuf_nbytes = 0;
101 unsigned int vidbuf_capacity;
112 "packet. Using default video time base.\n");
130 vidbuf_start[vidbuf_nbytes++] = block_type;
137 if (
avio_read(pb, &vidbuf_start[vidbuf_nbytes], 2) != 2) {
150 vidbuf_start[vidbuf_nbytes++] = code;
154 vidbuf_start[vidbuf_nbytes++] =
avio_r8(pb);
156 if (
avio_read(pb, &vidbuf_start[vidbuf_nbytes], code) != code) {
160 vidbuf_nbytes += code;
162 bytes_copied += code & 0x7F;
163 if(bytes_copied == npixels){
169 if (bytes_copied > npixels) {
178 memcpy(pkt->
data, vidbuf_start, vidbuf_nbytes);
208 unsigned char block_type;
252 if ((ret_value =
av_get_packet(pb, pkt, audio_length)) != audio_length) {
266 return read_frame(vid, pb, pkt, block_type, s);
274 av_log(s,
AV_LOG_ERROR,
"unknown block (character = %c, decimal = %d, hex = %x)!!!\n",
275 block_type, block_type, block_type);
288 .
name =
"bethsoftvid",