Proper CodecPrivate for video tracks.

This commit is contained in:
Moritz Bunkus 2003-09-02 17:38:07 +00:00
parent 9efc9e9389
commit a0c8e2670a
4 changed files with 11 additions and 5 deletions

View File

@ -192,6 +192,7 @@ int vorbis_packetizer_c::process(unsigned char *data, int size,
return EMOREDATA;
}
mxverb(2, "Vorbis: samples_here: %lld\n", samples_here);
add_packet(data, size, (int64_t)timecode, (int64_t)(samples_here * 1000 *
ti->async.linear / vi.rate));

View File

@ -136,4 +136,9 @@ typedef struct {
uint16_t color_table_id;
} video_stsd_atom_t;
typedef struct {
uint32_t size;
video_stsd_atom_t id;
} qt_image_description_t;
#endif // __QTMP4_ATOMS_H

View File

@ -478,11 +478,11 @@ void qtmp4_reader_c::handle_header_atoms(uint32_t parent, int64_t parent_size,
new_dmx->v_height = get_uint16_be(&v_stsd.height);
new_dmx->v_bitdepth = get_uint16_be(&v_stsd.depth);
new_dmx->v_desc =
(video_stsd_atom_t *)safemalloc(size - 8);
io->setFilePointer(pos + 8);
if (io->read(new_dmx->v_desc, size - 8) != (size - 8))
(qt_image_description_t *)safemalloc(size);
io->setFilePointer(pos);
if (io->read(new_dmx->v_desc, size) != size)
throw exception();
new_dmx->v_desc_size = size - 8;
new_dmx->v_desc_size = size;
}
io->setFilePointer(pos + size);

View File

@ -91,7 +91,7 @@ typedef struct {
uint32_t editlist_table_len;
uint32_t v_width, v_height, v_bitdepth;
video_stsd_atom_t *v_desc;
qt_image_description_t *v_desc;
uint32_t v_desc_size;
uint32_t a_channels, a_bitdepth;
float a_samplerate;