Changeset 3743
- Timestamp:
- 2008-10-27 01:45:09 (2 months ago)
- Files:
-
- libannodex/trunk/src/importers/anx_import_ogg.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libannodex/trunk/src/importers/anx_import_ogg.c
r3742 r3743 276 276 ret = anx_malloc (strlen (s) + 1); 277 277 return strcpy (ret, s); 278 } 279 280 static AnxOggPacket * 281 anxogg_packet_new (ogg_packet * op, AnxSourceTrack * source_track, 282 double current_time) 283 { 284 AnxOggPacket * aop; 285 286 aop = anx_malloc (sizeof (AnxOggPacket)); 287 aop->length = op->bytes; 288 aop->data = anx_malloc (op->bytes); 289 aop->granulepos = op->granulepos; 290 aop->current_time = current_time; 291 aop->source_track = source_track; 292 aop->eos = op->e_o_s; 293 294 return aop; 295 } 296 297 static AnxOggPacket * 298 anxogg_packet_free (AnxOggPacket * aop) 299 { 300 anx_free (aop->data); 301 anx_free (aop); 302 return NULL; 278 303 } 279 304 … … 1084 1109 fprintf (aod->df, "anxogg::read_packet_data: no, copy out\n"); 1085 1110 #endif 1086 aop = anx_malloc (sizeof (AnxOggPacket)); 1087 aop->length = op->bytes; 1088 aop->data = anx_malloc (op->bytes); 1089 aop->granulepos = op->granulepos; 1090 aop->current_time = ((double)oggz_tell_units (oggz)) / SUBSECONDS; 1091 aop->source_track = track; 1092 aop->eos = op->e_o_s; 1093 1094 #if 0 1095 if (aod->nr_headers_remaining == 0 && aop->granulepos != -1) { 1096 aop->granulepos -= track->start_granule; 1097 } 1098 #endif 1099 1111 1112 aop = anxogg_packet_new (op, track, 1113 ((double)oggz_tell_units(oggz)) / SUBSECONDS); 1100 1114 memcpy (aop->data, op->packet, op->bytes); 1101 1115 … … 1133 1147 1134 1148 return OGGZ_STOP_OK; 1135 }1136 1137 static AnxOggPacket *1138 anxogg_packet_free (AnxOggPacket * aop)1139 {1140 anx_free (aop->data);1141 anx_free (aop);1142 return NULL;1143 1149 } 1144 1150