Commit eee3e346 authored by David Schleef's avatar David Schleef

Apply patch from jesimon@libertysurf.fr (Jeremy SIMON) in #122368.

Original commit message from CVS:
Apply patch from jesimon@libertysurf.fr (Jeremy SIMON) in #122368.
FLAC io functions should be called every time the encoder is initialized.
parent df41e0a0
......@@ -335,14 +335,6 @@ gst_flacenc_init (FlacEnc *flacenc)
flacenc->encoder = FLAC__seekable_stream_encoder_new();
FLAC__seekable_stream_encoder_set_write_callback (flacenc->encoder,
gst_flacenc_write_callback);
FLAC__seekable_stream_encoder_set_seek_callback (flacenc->encoder,
gst_flacenc_seek_callback);
FLAC__seekable_stream_encoder_set_client_data (flacenc->encoder,
flacenc);
flacenc->negotiated = FALSE;
flacenc->first = TRUE;
flacenc->first_buf = NULL;
......@@ -580,6 +572,15 @@ gst_flacenc_chain (GstPad *pad, GstData *_data)
FLAC__SEEKABLE_STREAM_ENCODER_UNINITIALIZED)
{
FLAC__SeekableStreamEncoderState state;
FLAC__seekable_stream_encoder_set_write_callback (flacenc->encoder,
gst_flacenc_write_callback);
FLAC__seekable_stream_encoder_set_seek_callback (flacenc->encoder,
gst_flacenc_seek_callback);
FLAC__seekable_stream_encoder_set_client_data (flacenc->encoder,
flacenc);
gst_flacenc_set_metadata (flacenc);
state = FLAC__seekable_stream_encoder_init (flacenc->encoder);
if (state != FLAC__STREAM_ENCODER_OK) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment