Mercurial > libedl
diff src/edl.c @ 14:2d7c810a1ac2 default tip
*: misc. cleanup
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Fri, 03 May 2024 22:40:28 -0400 |
parents | 41b74137e201 |
children |
line wrap: on
line diff
--- a/src/edl.c Wed Apr 03 20:48:51 2024 -0400 +++ b/src/edl.c Fri May 03 22:40:28 2024 -0400 @@ -397,32 +397,31 @@ "\"Looped\";\"OnRuler\";\"MediaType\";\"FileName\";\"Stream\";\"StreamStart\";\"StreamLength\";" "\"FadeTimeIn\";\"FadeTimeOut\";\"SustainGain\";\"CurveIn\";\"GainIn\";\"CurveOut\";\"GainOut\";" "\"Layer\";\"Color\";\"CurveInR\";\"CurveOutR\":\"PlayPitch\";\"LockPitch\";\"FirstChannel\";\"Channels\"\n"; + EDL_header header = {0}; + size_t i; EDL_internal_string ret; EDL_internal_string_init(&ret); EDL_internal_string_append(&ret, order_str, strlen(order_str)); - { - EDL_header header = {0}; - if (EDL_internal_parse_header(&header, order_str, 0, strlen(order_str)) < 0) - return NULL; /* how? */ + if (EDL_internal_parse_header(&header, order_str, 0, strlen(order_str)) < 0) + return NULL; /* how? */ - size_t i; - for (i = 0; i < edl->size; i++) - EDL_dump_line(&ret, &edl->arr[i], &header); + for (i = 0; i < edl->size; i++) + EDL_dump_line(&ret, &edl->arr[i], &header); - EDL_internal_free_header(&header); - } + EDL_internal_free_header(&header); return ret.data; } void EDL_free(EDL* edl) { size_t i; - for (i = 0; i < edl->size; i++) { + + for (i = 0; i < edl->size; i++) if (edl->arr[i].filename) free(edl->arr[i].filename); - } + free(edl->arr); }