diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-12-15 19:42:24 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2010-12-20 12:50:40 +0100 |
commit | 2286326203b6ac229828f46662f6498b1044d413 (patch) | |
tree | 4981bd69956ee5f2682a95591714b31bde1ff120 | |
parent | a3a0345dcde1acde18160042277912f7b1312c24 (diff) |
wj2pay: fix offsets
-rw-r--r-- | gst/rtp/gstrtpwj2pay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtp/gstrtpwj2pay.c b/gst/rtp/gstrtpwj2pay.c index e5335f2ec..5c1f8b130 100644 --- a/gst/rtp/gstrtpwj2pay.c +++ b/gst/rtp/gstrtpwj2pay.c @@ -639,7 +639,8 @@ gst_rtp_wj2_pay_handle_buffer (GstBaseRTPPayload * basepayload, GstBuffer *paybuf; /* make subbuffer of j2k data */ - paybuf = gst_buffer_create_sub (buffer, offset, data_size); + paybuf = + gst_buffer_create_sub (buffer, &jdata[offset] - data, data_size); /* create a new group to hold the header and the payload */ gst_buffer_list_iterator_add_group (it); @@ -649,7 +650,7 @@ gst_rtp_wj2_pay_handle_buffer (GstBaseRTPPayload * basepayload, gst_buffer_list_iterator_add (it, paybuf); } else { /* copy payload */ - memcpy (header + HEADER_SIZE, &data[offset], data_size); + memcpy (header + HEADER_SIZE, &jdata[offset], data_size); ret = gst_basertppayload_push (basepayload, outbuf); if (ret != GST_FLOW_OK) |