output: pass audio_format to plugin.init() and plugin.open()

Pass the globally configured audio_format as a const pointer to
plugin.init().  plugin.open() gets a writable pointer which contains
the audio_format requested by the plugin.  Its initial value is either
the configured audio_format or the input file's audio_format.
This commit is contained in:
Max Kellermann
2008-09-24 07:20:36 +02:00
parent d32f49a90b
commit 3cae6856b8
13 changed files with 61 additions and 34 deletions

View File

@@ -102,7 +102,7 @@ int audio_output_init(struct audio_output *ao, ConfigParam * param)
notify_init(&ao->notify);
ao->command = AO_COMMAND_NONE;
if (plugin->init(ao, param) != 0)
if (plugin->init(ao, format ? &ao->reqAudioFormat : NULL, param) != 0)
return 0;
return 1;