From 2286326203b6ac229828f46662f6498b1044d413 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 15 Dec 2010 19:42:24 +0100 Subject: wj2pay: fix offsets --- gst/rtp/gstrtpwj2pay.c | 5 +++-- 1 file 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) -- cgit v1.2.3