summaryrefslogtreecommitdiff
path: root/ext/flac/gstflacenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/flac/gstflacenc.c')
-rw-r--r--ext/flac/gstflacenc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c
index d31de07d8..ff3de47a0 100644
--- a/ext/flac/gstflacenc.c
+++ b/ext/flac/gstflacenc.c
@@ -809,11 +809,10 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter)
}
static guint64
-gst_flac_enc_peer_query_total_samples (GstFlacEnc * flacenc, GstPad * pad)
+gst_flac_enc_peer_query_total_samples (GstFlacEnc * flacenc, GstPad * pad,
+ GstAudioInfo * info)
{
gint64 duration;
- GstAudioInfo *info =
- gst_audio_encoder_get_audio_info (GST_AUDIO_ENCODER (flacenc));
GST_DEBUG_OBJECT (flacenc, "querying peer for DEFAULT format duration");
if (gst_pad_peer_query_duration (pad, GST_FORMAT_DEFAULT, &duration)
@@ -862,7 +861,7 @@ gst_flac_enc_set_format (GstAudioEncoder * enc, GstAudioInfo * info)
flacenc->channel_reorder_map);
total_samples = gst_flac_enc_peer_query_total_samples (flacenc,
- GST_AUDIO_ENCODER_SINK_PAD (enc));
+ GST_AUDIO_ENCODER_SINK_PAD (enc), info);
FLAC__stream_encoder_set_bits_per_sample (flacenc->encoder,
GST_AUDIO_INFO_DEPTH (info));