int mpeg3_copy_title(mpeg3_title_t *dst, mpeg3_title_t *src) { int i; mpeg3_copy_fs(dst->fs, src->fs); dst->total_bytes = src->total_bytes; if(src->timecode_table_size) { dst->timecode_table_allocation = src->timecode_table_allocation; dst->timecode_table_size = src->timecode_table_size; dst->timecode_table = (mpeg3demux_timecode_t *) memoryAllocate(1, sizeof(mpeg3demux_timecode_t) * dst->timecode_table_allocation); for(i = 0; i < dst->timecode_table_size; i++) { dst->timecode_table[i] = src->timecode_table[i]; } } }
int mpeg3_copy_title(mpeg3_title_t *dst, mpeg3_title_t *src) { int i; mpeg3_copy_fs(dst->fs, src->fs); dst->total_bytes = src->total_bytes; dst->start_byte = src->start_byte; dst->end_byte = src->end_byte; if(src->cell_table_size) { dst->cell_table_allocation = src->cell_table_allocation; dst->cell_table_size = src->cell_table_size; dst->cell_table = calloc(1, sizeof(mpeg3_cell_t) * dst->cell_table_allocation); for(i = 0; i < dst->cell_table_size; i++) { dst->cell_table[i] = src->cell_table[i]; } } return 0; }