From 2bf7ec4f3935c68e6d129ffac17820411b3ea44d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:04 +0200 Subject: added decoder_initialized() decoder_initialized() sets the state to DECODE_STATE_DECODE and wakes up the player thread. It is called by the decoder plugin after its internal initialization is finished. More arguments will be added later to prevent direct accesses to the DecoderControl struct. --- src/inputPlugins/oggvorbis_plugin.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/inputPlugins/oggvorbis_plugin.c') diff --git a/src/inputPlugins/oggvorbis_plugin.c b/src/inputPlugins/oggvorbis_plugin.c index cb0c5a94..0867de69 100644 --- a/src/inputPlugins/oggvorbis_plugin.c +++ b/src/inputPlugins/oggvorbis_plugin.c @@ -18,7 +18,7 @@ /* TODO 'ogg' should probably be replaced with 'oggvorbis' in all instances */ -#include "../inputPlugin.h" +#include "../decoder_api.h" #ifdef HAVE_OGGVORBIS @@ -210,8 +210,7 @@ static void putOggCommentsIntoOutputBuffer(char *streamName, } /* public */ -static int oggvorbis_decode(mpd_unused struct decoder * decoder, - InputStream * inStream) +static int oggvorbis_decode(struct decoder * decoder, InputStream * inStream) { OggVorbis_File vf; ov_callbacks callbacks; @@ -287,7 +286,7 @@ static int oggvorbis_decode(mpd_unused struct decoder * decoder, if (dc.state == DECODE_STATE_START) { getOutputAudioFormat(&(dc.audioFormat), &(ob.audioFormat)); - dc.state = DECODE_STATE_DECODE; + decoder_initialized(decoder); } comments = ov_comment(&vf, -1)->user_comments; putOggCommentsIntoOutputBuffer(inStream->metaName, -- cgit v1.2.3