mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +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");
|
GST_DEBUG_OBJECT (visual, "allocating output buffer");
|
||||||
ret = gst_buffer_pool_acquire_buffer (visual->pool, &outbuf, NULL);
|
ret = gst_buffer_pool_acquire_buffer (visual->pool, &outbuf, NULL);
|
||||||
if (ret != GST_FLOW_OK) {
|
if (ret != GST_FLOW_OK) {
|
||||||
gst_adapter_unmap (visual->adapter, 0);
|
gst_adapter_unmap (visual->adapter);
|
||||||
goto beach;
|
goto beach;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -860,7 +860,7 @@ gst_visual_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
gst_buffer_unmap (outbuf, outdata, outsize);
|
gst_buffer_unmap (outbuf, outdata, outsize);
|
||||||
GST_DEBUG_OBJECT (visual, "rendered one frame");
|
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_TIMESTAMP (outbuf) = timestamp;
|
||||||
GST_BUFFER_DURATION (outbuf) = visual->duration;
|
GST_BUFFER_DURATION (outbuf) = visual->duration;
|
||||||
|
|
|
@ -1061,7 +1061,7 @@ theora_enc_read_multipass_cache (GstTheoraEnc * enc)
|
||||||
bytes_consumed =
|
bytes_consumed =
|
||||||
th_encode_ctl (enc->encoder, TH_ENCCTL_2PASS_IN, (guint8 *) cache_data,
|
th_encode_ctl (enc->encoder, TH_ENCCTL_2PASS_IN, (guint8 *) cache_data,
|
||||||
bytes_read);
|
bytes_read);
|
||||||
gst_adapter_unmap (enc->multipass_cache_adapter, 0);
|
gst_adapter_unmap (enc->multipass_cache_adapter);
|
||||||
|
|
||||||
done = bytes_consumed <= 0;
|
done = bytes_consumed <= 0;
|
||||||
if (bytes_consumed > 0)
|
if (bytes_consumed > 0)
|
||||||
|
|
|
@ -773,7 +773,7 @@ gst_audio_encoder_push_buffers (GstAudioEncoder * enc, gboolean force)
|
||||||
|
|
||||||
if (G_LIKELY (buf)) {
|
if (G_LIKELY (buf)) {
|
||||||
gst_buffer_unref (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 */
|
/* 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);
|
data = gst_adapter_map (this->adapter, this->payload_length);
|
||||||
res = gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
|
res = gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
|
||||||
data);
|
data);
|
||||||
gst_adapter_unmap (this->adapter, 0);
|
gst_adapter_unmap (this->adapter);
|
||||||
|
|
||||||
if (!res)
|
if (!res)
|
||||||
goto payload_validate_error;
|
goto payload_validate_error;
|
||||||
|
|
|
@ -1421,9 +1421,10 @@ feed_textbuf (GstSubParse * self, GstBuffer * buf)
|
||||||
|
|
||||||
if (input && consumed > 0) {
|
if (input && consumed > 0) {
|
||||||
self->textbuf = g_string_append (self->textbuf, input);
|
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 {
|
} else {
|
||||||
gst_adapter_unmap (self->adapter, 0);
|
gst_adapter_unmap (self->adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (input);
|
g_free (input);
|
||||||
|
|
Loading…
Reference in a new issue