+ if( !sedit->length ) continue;
+ int64_t end = start + sedit->length;
+ double st = sedit->track->from_units(start);
+ int shr = st/3600; st -= shr*3600;
+ int smn = st/60; st -= smn*60;
+ int ssc = st; st -= ssc;
+ int sms = st*1000;
+ double et = sedit->track->from_units(end);
+ int ehr = et/3600; et -= ehr*3600;
+ int emn = et/60; et -= emn*60;
+ int esc = et; et -= esc;
+ int ems = et*1000;
+ char *text = sedit->get_text();
+ if( *text ) {
+ ++count;
+ switch( sub_format ) {
+ case SUB_FORMAT_SRT:
+ fprintf(fp, "%d\n%02d:%02d:%02d,%03d --> %02d:%02d:%02d,%03d\n%s\n\n",
+ count, shr, smn, ssc, sms, ehr, emn, esc, ems, text);
+ break;
+ case SUB_FORMAT_RIP:
+ fprintf(fp, "%02d:%02d:%02d.%02d,%02d:%02d:%02d.%02d\n%s\n\n",
+ shr, smn, ssc, sms/10, ehr, emn, esc, ems/10, text);
+ break;
+ case SUB_FORMAT_UDVD: