mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
update for adapter api changes
This commit is contained in:
parent
de0b93a7fc
commit
e338792ab0
5 changed files with 8 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue