From 7dd0d8f6df667a2a9722feb91659983684210553 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 25 Sep 2010 11:55:56 +0000 Subject: af.c: Minor simplification of af_init git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32347 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/af.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libaf/af.c') 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; -- cgit v1.2.3