summaryrefslogtreecommitdiffstats
path: root/libaf
diff options
context:
space:
mode:
Diffstat (limited to 'libaf')
-rw-r--r--libaf/af.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libaf/af.c b/libaf/af.c
index 9ec9d2aecb..5238e6bc85 100644
--- a/libaf/af.c
+++ b/libaf/af.c
@@ -437,11 +437,7 @@ int af_init(af_stream_t* s)
// Check if this is the first call
if(!s->first){
// Add all filters in the list (if there are any)
- if(!s->cfg.list){ // To make automatic format conversion work
- if(!af_append(s,s->first,"dummy"))
- return -1;
- }
- else{
+ if (s->cfg.list) {
while(s->cfg.list[i]){
if(!af_append(s,s->last,s->cfg.list[i++]))
return -1;
@@ -449,6 +445,11 @@ int af_init(af_stream_t* s)
}
}
+ // If we do not have any filters otherwise
+ // add dummy to make automatic format conversion work
+ if (!s->first && !af_append(s, s->first, "dummy"))
+ return -1;
+
// Init filters
if(AF_OK != af_reinit(s,s->first))
return -1;