GNOME Bugzilla – Bug 116178
flacdec incorrectly finish the decoder at EOS
Last modified: 2004-12-22 21:47:04 UTC
When an EOS is encountered ( in the datastream, not an EOS event of GStreamer), the decoder is finished with a call to FLAC__seekable_stream_decoder_finish ( line 471 of gstflacdec.c ), and the flag init is set to TRUE so that when a new stream is given, the decoder would be re-inited again and the decoding could take place. Unfortunatly the init flag only make a call to FLAC_..._init and this call WILL fail because with the finish call, all the options/callbacks have been resetted. ( If you look at the error code when this init happen, you'll receive error code 'Callbacks not set' ). So to fix this problem, you can replace the call to finish with a call to FLAC__seekable_stream_decoder_reset, and there is no need to set the init flag to true. In some cases ( when going from READY to PAUSED, ... ), an init will be performed on an already inited stream, with no consequence. The call fail but the decoder is left untouched.
Created attachment 20478 [details] [review] patch
patch from Sylvain attached and commited in 0.6.3.1, closing
This is required in 0.7.x too.
Fixed in HEAD/CVS too...