mirror of https://github.com/mpv-player/mpv
af.c: Minor simplification of af_init
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32347 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8d466ff705
commit
7dd0d8f6df
11
libaf/af.c
11
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;
|
||||
|
|
Loading…
Reference in New Issue