mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 11:29:55 +00:00
asfpacket: fix 0.11 ported payload extraction
... to cater for not necessarily offset == size - cur_pos, as size may have been adjusted due to padding. Fixes #667567.
This commit is contained in:
parent
86313742d4
commit
0bc76c0d03
2 changed files with 5 additions and 1 deletions
|
@ -77,7 +77,8 @@ asf_packet_create_payload_buffer (AsfPacket * packet, const guint8 ** p_data,
|
|||
|
||||
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;
|
||||
|
@ -484,6 +485,8 @@ gst_asf_demux_parse_packet (GstASFDemux * demux, GstBuffer * buf)
|
|||
goto short_packet;
|
||||
|
||||
packet.buf = buf;
|
||||
/* evidently transient */
|
||||
packet.bdata = data;
|
||||
|
||||
ec_flags = GST_READ_UINT8 (data);
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ typedef struct {
|
|||
|
||||
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) */
|
||||
|
|
Loading…
Reference in a new issue