GST_LOG_OBJECT (dvdepay, "got block at location %d", location);
}
- /* get the byte offset of the dif block */
- offset = location * 80;
+ if (location != -1) {
+ /* get the byte offset of the dif block */
+ offset = location * 80;
- /* And copy it in, provided the location is sane. */
- if (offset >= 0 && offset <= dvdepay->frame_size - 80)
- memcpy (GST_BUFFER_DATA (dvdepay->acc) + offset, payload, 80);
+ /* And copy it in, provided the location is sane. */
+ if (offset <= dvdepay->frame_size - 80)
+ memcpy (GST_BUFFER_DATA (dvdepay->acc) + offset, payload, 80);
+ }
payload += 80;
payload_len -= 80;