Index: libaf/af.c =================================================================== RCS file: /cvsroot/mplayer/main/libaf/af.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- libaf/af.c 16 Apr 2005 16:48:15 -0000 1.44 +++ libaf/af.c 1 May 2005 09:23:31 -0000 1.45 @@ -368,6 +368,11 @@ if(AF_OK != af_reinit(s,s->first)) return -1; + // make sure the chain is not empty and valid (e.g. because of AF_DETACH) + if (!s->first) + if (!af_append(s,s->first,"dummy") || AF_OK != af_reinit(s,s->first)) + return -1; + // If force_output isn't set do not compensate for output format if(!force_output){ memcpy(&s->output, s->last->data, sizeof(af_data_t));