mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
demux: new packet should not point to source buffer when copying data
In `new_demux_packet_from`, we initialise a new packet and allocate a buffer which we copy the source data into. But I was then assigning the original source pointer as the packet's buffer, rather than keeping the newly allocated one. Whoops.
This commit is contained in:
@@ -120,7 +120,6 @@ struct demux_packet *new_demux_packet_from(void *data, size_t len)
|
||||
if (!dp)
|
||||
return NULL;
|
||||
memcpy(dp->avpacket->data, data, len);
|
||||
dp->buffer = data;
|
||||
return dp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user