... to cater for not necessarily offset == size - cur_pos,
as size may have been adjusted due to padding.
Fixes #667567.
g_assert (payload_len <= *p_size);
- off = (guint) (gst_buffer_get_size (packet->buf) - *p_size);
+ off = (guint) (*p_data - packet->bdata);
+ g_assert (off < gst_buffer_get_size (packet->buf));
*p_data += payload_len;
*p_size -= payload_len;
goto short_packet;
packet.buf = buf;
+ /* evidently transient */
+ packet.bdata = data;
ec_flags = GST_READ_UINT8 (data);
typedef struct {
GstBuffer *buf;
+ const guint8 *bdata;
guint length; /* packet length (unused) */
guint padding; /* length of padding at end of packet */
guint sequence; /* sequence (unused) */