mirror of https://github.com/mpv-player/mpv
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:
parent
d628e6108e
commit
33e73f4efd
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue