mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
[MOVED FROM GST-P-FARSIGHT] Rename offset to out_offset to make its meaning clearer
This commit is contained in:
parent
72c979d84b
commit
4d3e6501d9
1 changed files with 5 additions and 5 deletions
|
@ -175,7 +175,7 @@ gst_siren_enc_chain (GstPad *pad, GstBuffer *buf)
|
||||||
GstFlowReturn ret = GST_FLOW_OK;
|
GstFlowReturn ret = GST_FLOW_OK;
|
||||||
GstBuffer *encoded = NULL;
|
GstBuffer *encoded = NULL;
|
||||||
guint8 *data = NULL;
|
guint8 *data = NULL;
|
||||||
gint offset = 0;
|
gint out_offset = 0;
|
||||||
gint encode_ret = 0;
|
gint encode_ret = 0;
|
||||||
gint size = 0;
|
gint size = 0;
|
||||||
guint in_offset = 0;
|
guint in_offset = 0;
|
||||||
|
@ -206,12 +206,12 @@ gst_siren_enc_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (ret != GST_FLOW_OK)
|
if (ret != GST_FLOW_OK)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
while (offset < size && ret == GST_FLOW_OK) {
|
while (out_offset < size && ret == GST_FLOW_OK) {
|
||||||
GST_LOG_OBJECT (enc, "Encoding frame");
|
GST_LOG_OBJECT (enc, "Encoding frame");
|
||||||
|
|
||||||
encode_ret = Siren7_EncodeFrame (enc->encoder,
|
encode_ret = Siren7_EncodeFrame (enc->encoder,
|
||||||
data + in_offset,
|
data + in_offset,
|
||||||
GST_BUFFER_DATA (encoded) + offset);
|
GST_BUFFER_DATA (encoded) + out_offset);
|
||||||
if (encode_ret != 0) {
|
if (encode_ret != 0) {
|
||||||
GST_ERROR_OBJECT (enc, "Siren7_EncodeFrame returned %d", encode_ret);
|
GST_ERROR_OBJECT (enc, "Siren7_EncodeFrame returned %d", encode_ret);
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
|
@ -219,11 +219,11 @@ gst_siren_enc_chain (GstPad *pad, GstBuffer *buf)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset += 40;
|
out_offset += 40;
|
||||||
in_offset += 640;
|
in_offset += 640;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_LOG_OBJECT (enc, "Finished encoding : %d", offset);
|
GST_LOG_OBJECT (enc, "Finished encoding : %d", out_offset);
|
||||||
|
|
||||||
ret = gst_pad_push (enc->srcpad, encoded);
|
ret = gst_pad_push (enc->srcpad, encoded);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue