update for adapter api changes

This commit is contained in:
Wim Taymans 2011-11-10 18:32:39 +01:00
parent de0b93a7fc
commit e338792ab0
5 changed files with 8 additions and 7 deletions

View file

@ -848,7 +848,7 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
GST_DEBUG_OBJECT (visual, "allocating output buffer");
ret = gst_buffer_pool_acquire_buffer (visual->pool, &outbuf, NULL);
if (ret != GST_FLOW_OK) {
gst_adapter_unmap (visual->adapter, 0);
gst_adapter_unmap (visual->adapter);
goto beach;
}
}
@ -860,7 +860,7 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
gst_buffer_unmap (outbuf, outdata, outsize);
GST_DEBUG_OBJECT (visual, "rendered one frame");
gst_adapter_unmap (visual->adapter, 0);
gst_adapter_unmap (visual->adapter);
GST_BUFFER_TIMESTAMP (outbuf) = timestamp;
GST_BUFFER_DURATION (outbuf) = visual->duration;

View file

@ -1061,7 +1061,7 @@ theora_enc_read_multipass_cache (GstTheoraEnc * enc)
bytes_consumed =
th_encode_ctl (enc->encoder, TH_ENCCTL_2PASS_IN, (guint8 *) cache_data,
bytes_read);
gst_adapter_unmap (enc->multipass_cache_adapter, 0);
gst_adapter_unmap (enc->multipass_cache_adapter);
done = bytes_consumed <= 0;
if (bytes_consumed > 0)

View file

@ -773,7 +773,7 @@ gst_audio_encoder_push_buffers (GstAudioEncoder * enc, gboolean force)
if (G_LIKELY (buf)) {
gst_buffer_unref (buf);
gst_adapter_unmap (priv->adapter, 0);
gst_adapter_unmap (priv->adapter);
}
/* no data to feed, no leftover provided, then bail out */

View file

@ -286,7 +286,7 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
data = gst_adapter_map (this->adapter, this->payload_length);
res = gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
data);
gst_adapter_unmap (this->adapter, 0);
gst_adapter_unmap (this->adapter);
if (!res)
goto payload_validate_error;

View file

@ -1421,9 +1421,10 @@ feed_textbuf (GstSubParse * self, GstBuffer * buf)
if (input && consumed > 0) {
self->textbuf = g_string_append (self->textbuf, input);
gst_adapter_unmap (self->adapter, consumed);
gst_adapter_unmap (self->adapter);
gst_adapter_flush (self->adapter, consumed);
} else {
gst_adapter_unmap (self->adapter, 0);
gst_adapter_unmap (self->adapter);
}
g_free (input);