diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-09-25 11:55:56 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:07 +0200 |
commit | 7dd0d8f6df667a2a9722feb91659983684210553 (patch) | |
tree | ff8c4c2e8123bf515c80a7775d159ddc95199b83 | |
parent | 8d466ff7053760ae2248b36b8f98a6c3276b0566 (diff) | |
download | mpv-7dd0d8f6df667a2a9722feb91659983684210553.tar.bz2 mpv-7dd0d8f6df667a2a9722feb91659983684210553.tar.xz |
af.c: Minor simplification of af_init
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32347 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libaf/af.c | 11 |
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; |