vorbis: Update for audio base classes API changes

This commit is contained in:
Sebastian Dröge 2012-07-23 10:30:40 +02:00
parent 7fdbeb659a
commit 5d830cfbd8
2 changed files with 7 additions and 3 deletions

View file

@ -478,7 +478,7 @@ vorbis_handle_data_packet (GstVorbisDec * vd, ogg_packet * packet,
sample_count, size);
/* alloc buffer for it */
out = gst_buffer_new_allocate (NULL, size, NULL);
out = gst_audio_decoder_allocate_output_buffer (GST_AUDIO_DECODER (vd), size);
gst_buffer_map (out, &map, GST_MAP_WRITE);
/* get samples ready for reading now, should be sample_count */

View file

@ -561,7 +561,9 @@ gst_vorbis_enc_buffer_from_header_packet (GstVorbisEnc * vorbisenc,
{
GstBuffer *outbuf;
outbuf = gst_buffer_new_and_alloc (packet->bytes);
outbuf =
gst_audio_encoder_allocate_output_buffer (GST_AUDIO_ENCODER (vorbisenc),
packet->bytes);
gst_buffer_fill (outbuf, 0, packet->packet, packet->bytes);
GST_BUFFER_OFFSET (outbuf) = vorbisenc->bytes_out;
GST_BUFFER_OFFSET_END (outbuf) = 0;
@ -798,7 +800,9 @@ gst_vorbis_enc_output_buffers (GstVorbisEnc * vorbisenc)
GstBuffer *buf;
GST_LOG_OBJECT (vorbisenc, "pushing out a data packet");
buf = gst_buffer_new_and_alloc (op.bytes);
buf =
gst_audio_encoder_allocate_output_buffer (GST_AUDIO_ENCODER
(vorbisenc), op.bytes);
gst_buffer_fill (buf, 0, op.packet, op.bytes);
/* tracking granulepos should tell us samples accounted for */
ret =