mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
opus: don't use deprecated gst_buffer_new_and_alloc
Use the helper function available in the base class instead. https://bugzilla.gnome.org/show_bug.cgi?id=748585
This commit is contained in:
parent
c754b8526b
commit
036f07e087
2 changed files with 6 additions and 2 deletions
|
@ -431,7 +431,9 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer)
|
||||||
samples = 120 * dec->sample_rate / 1000;
|
samples = 120 * dec->sample_rate / 1000;
|
||||||
packet_size = samples * dec->n_channels * 2;
|
packet_size = samples * dec->n_channels * 2;
|
||||||
|
|
||||||
outbuf = gst_buffer_new_and_alloc (packet_size);
|
outbuf =
|
||||||
|
gst_audio_decoder_allocate_output_buffer (GST_AUDIO_DECODER (dec),
|
||||||
|
packet_size);
|
||||||
if (!outbuf) {
|
if (!outbuf) {
|
||||||
goto buffer_failed;
|
goto buffer_failed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -918,7 +918,9 @@ gst_opus_enc_encode (GstOpusEnc * enc, GstBuffer * buf)
|
||||||
|
|
||||||
g_assert (size == bytes);
|
g_assert (size == bytes);
|
||||||
|
|
||||||
outbuf = gst_buffer_new_and_alloc (max_payload_size * enc->n_channels);
|
outbuf =
|
||||||
|
gst_audio_encoder_allocate_output_buffer (GST_AUDIO_ENCODER (enc),
|
||||||
|
max_payload_size * enc->n_channels);
|
||||||
if (!outbuf)
|
if (!outbuf)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue