--- multiplexer/global.h 2001/04/09 15:51:29 1.7 +++ multiplexer/global.h 2001/04/25 12:29:24 1.8 @@ -182,6 +182,13 @@ typedef struct { #define unionalloc(typ,fld) \ (malloc (sizeof(typ)-sizeof(((typ*)0)->u)+sizeof(((typ*)0)->u.fld))) +/* Release a chained list completely */ +#define releasechain(typ,root) \ + { register typ *n, *p = root; \ + while (p != NULL) { \ + n = p->next; free (p); p = n; \ + } } + /* Reference descriptors as these are parsed from PSI */ typedef struct { int programnumber; @@ -206,8 +213,12 @@ typedef struct pmtdescr { } pmt_descr; /* Automatic stream usage requests as stated via command */ -typedef struct { - int sprg, tprg, ssid, tsid; +typedef struct tsautodescr { + struct tsautodescr *next; + int sprg; + int tprg; + int ssid; /* ssid<0 when referencing a complete program */ + int tsid; } tsauto_descr; /* Supported input file types */ @@ -273,7 +284,6 @@ typedef struct { byte newpat_version; pmt_descr *pat; pmt_descr *newpat; - int tsautos; tsauto_descr *tsauto; struct streamdescr *stream[MAX_STRPERTS]; } ts;