j2kpay: stop scanning when we reached the end

Stop scanning for markers when we reached the end of the data.
This commit is contained in:
Wim Taymans 2010-12-14 15:27:52 +01:00
parent d30f3baffa
commit 957eac9579

View file

@ -437,6 +437,11 @@ gst_rtp_j2k_pay_handle_buffer (GstBaseRTPPayload * basepayload,
}
pos = end;
/* exit when finished */
if (pos == size)
break;
/* scan next packetization unit and fill in the header */
end = find_pu_end (pay, data, size, pos, &state);
} while (TRUE);